[ncl-talk] advice for a scatter plot
Will Hobbs
will.hobbs at utas.edu.au
Wed Feb 20 15:03:16 MST 2019
Cathy
I use two ways of doing this; which is better depends a bit on how many ‘classifications’ you have. If you have just a few the first method is easier; for many classifications (e.g. different markers for each model in a multi-model ensemble) the 2nd method is better:
1. Make separate scatterplots for each classification (in your case time period) setting the xyMarkerColor resource each time, then use the overlay() function to merge them. You’ll need to explicitly ensure that your axis ranges include the full data set using trXMinF, trXMaxF, trYMinF and trYMaxF resources
2. Make a dummy base xy plot with the whole dataset, setting xyLineColor resource to “transparent” (if you want a 1-to-1 or regression fit line you can plot this line using dummy x and y arrays instead). Then add markers colored as required using gsn_add_polymarker()
That’s a bit of a brief, rushed overview – let me know if it’s not clear.
Will
From: ncl-talk <ncl-talk-bounces at ucar.edu> on behalf of Cathy Smith <cathy.smith at noaa.gov>
Date: Thursday, 21 February 2019 at 3:09 AM
To: "ncl-talk at ucar.edu" <ncl-talk at ucar.edu>
Subject: [ncl-talk] advice for a scatter plot
NCLers
I would like to create a scatter plot of 2 time-series. That part is
easy in NCL :) But, I would like to color the markers as a function of
time. That is, if the time series were monthly from 1980-2010, then the
the dot for Jan 1980 pair of values might be blue while Dec 2010 would
transition to red. Is this possible? I see several NCL examples where
the color can be a function of the time-series values but not the itself.
Thanks for any advice.
Cathy
--
----------------------------------------------
NOAA/ESRL PSD and CU CIRES
303-497-6263
https://www.esrl.noaa.gov/psd/people/cathy.smith/<https://www.esrl.noaa.gov/psd/people/cathy.smith/>
Emails about data/webpages may get quicker responses from emailing
esrl.psd.data at noaa.gov
_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk<http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
University of Tasmania Electronic Communications Policy (December, 2014).
This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190220/036308f9/attachment.html>
More information about the ncl-talk
mailing list