Hello,
I am using Matplotlib 1.0.0 in Python 2.6.
I am trying to plot time series data of unique IDs and color the points
based on location. Each data point has a unique ID value, a date value, and
a location value.
The unique IDs and date values are plotting fine but I am unable to control
the color and subsequently the legend.

Here is a sample of the data.
IDs = [47, 33, 47, 12, 50, 50, 27, 27, 16, 27]
locations = ['201', '207', '207', '205', '204', '201', '209', '209',
'207','207']
dates = [ 733315.83240741,  733315.83521991,  733315.83681713,
        733315.83788194,  733336.54554398,  733336.54731481,
        733337.99842593,  733337.99943287,  733338.00070602,
        733338.00252315]

This basic code works.

fig = plt.figure()
ax = fig.add_subplot(111)
ax.scatter(dates,IDs,marker='d')
ax.xaxis_date()
fig.autofmt_xdate()
plt.grid(True)
plt.show()

I've been trying to figure out how to set color = locations with no success.
Any ideas out there?
Thanks,

Mike
-- 
View this message in context: 
http://old.nabble.com/color-problems-in-scatter-plot-tp32584727p32584727.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to