[ncl-talk] Removing 0,0 Coordinate Values from Scatterplot

Adam Phillips asphilli at ucar.edu
Fri Jun 28 16:05:43 MDT 2019


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 at _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>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190628/7499015c/attachment.html>


More information about the ncl-talk mailing list