[ncl-talk] Removing 0,0 Coordinate Values from Scatterplot
Zach Rieck
zrr817 at gmail.com
Mon Jul 1 19:22:08 MDT 2019
That makes sense.
Thank you Mr. Shea!
-Zach Rieck
zrr817 at gmail.com
(513)-502-5652
On Mon, Jul 1, 2019 at 7:55 AM Dennis Shea <shea at ucar.edu> wrote:
> [1] re: "Does the fill value need to be defined?" ===> No.
>
> [2] re: "since I'm redefining a variable ..."
>
> Technically, you are not *redefining *the variable. Rather, you are
> *reassigning* values.
>
> [3] re: "does this require := rather than = ""
>
> The *= *is an *assignment* operator. Since you are not changing the
> variable type or size or shape*, *you do not need to use* the
> reassignment *operator *:=*
>
> On Sun, Jun 30, 2019 at 7:33 PM Zach Rieck via ncl-talk <ncl-talk at ucar.edu>
> wrote:
>
>> Does the fill value need to be defined? And since I'm redefining a
>> variable does this require := rather than =?
>>
>> Thanks again for the help!
>>
>> -Zach Rieck
>> zrr817 at gmail.com
>> (513)-502-5652
>>
>>
>> On Fri, Jun 28, 2019 at 4:06 PM Adam Phillips <asphilli at ucar.edu> wrote:
>>
>>> Hi Zach,
>>> Something like this should work:
>>> ; output1 and output2 are 1D arrays of the same length
>>> output1 = where(output1.eq.0.and.output2.eq.0,output1@
>>> _FillValue,output1)
>>>
>>> That will set all points in output1 to _FillValue where both output1 and
>>> output2 are 0. Those points will not get plotted.
>>> (Note that this overwrites your output1 array, if you do not want that
>>> you'll want to copy output1 to say output1_save before doing the above.)
>>>
>>> If you have further questions let ncl-talk know.
>>> Adam
>>>
>>> On Fri, Jun 28, 2019 at 3:54 PM Zach Rieck via ncl-talk <
>>> ncl-talk at ucar.edu> wrote:
>>>
>>>> To whom it May Concern-
>>>>
>>>> I had a general question about how to change a scatter plot I have
>>>> created. The plot compares values from 2 model outputs relative to a 1:1
>>>> line for SLW, and since it is for a dry location, it has several 0,0
>>>> gridpoints (i.e. both models indicated no SLW was present).
>>>>
>>>> At the request of the leader of the project, I've been tasked with
>>>> removing those points from the plot. I was thinking about trying to use an
>>>> if then statement to try to reassign my plotting variables, but I'm unsure.
>>>>
>>>> Please advise. I framed this as a general question so I have not
>>>> attached code or data, but if that would be helpful to solving this
>>>> question please let me know.
>>>>
>>>> Respectfully,
>>>>
>>>> -Zach Rieck
>>>> zrr817 at gmail.com
>>>> (513)-502-5652
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> ncl-talk at ucar.edu
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>
>>>
>>>
>>> --
>>> Adam Phillips
>>> Associate Scientist, Climate and Global Dynamics Laboratory, NCAR
>>> www.cgd.ucar.edu/staff/asphilli/ 303-497-1726
>>>
>>> <http://www.cgd.ucar.edu/staff/asphilli>
>>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190701/ef2d20d0/attachment.html>
More information about the ncl-talk
mailing list