I am unable to set the color of the scatter plot points using the code below:
import matplotlib matplotlib.use('Qt4Agg') import matplotlib.pyplot as plt import numpy as np plt.scatter(newSpdVals, newEngLoadVals,c='g',marker='+') #Add the graph title and x/y axis labels plt.title("Gear Span") plt.xlabel("Vehicle Speed (mph)") plt.ylabel("Engine Load %") plt.show() No matter what I change the c parameter to ('b','r', etc.), the color of the scatter plot points are always black. The lists newSpdVals and newEngLoadVals have 100 dimmensions and are of type numpy.ndarray. I am using the following software and hardware: Windows XP Python 2.7 PyQt4 (I launch the plot from a PyQt GUI. I don't embed the plot in the GUI). matplotlib 1.01 In the beginning of the same function where my scatter plot code is, I added the following code to verify if the problem is due to the matplotlib/PyQt interface: a = np.linspace(-10,100,33) b = np.linspace(-32,400,33) plt.scatter(a, b,color='g',marker='+') plt.title("Gear Span") plt.xlabel("Vehicle Speed (mph)") plt.ylabel("Engine Load %") plt.show() The points for this plot are colored green. I'm able to change the point color to blue, red, etc. Any ideas why I can't change the point color of my first graph? Thank you for your help. -- View this message in context: http://old.nabble.com/Can%27t-set-scatter-plot-point-color-tp31051071p31051071.html Sent from the matplotlib - users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on application quality, and explores various alternative solutions. http://p.sf.net/sfu/progress-d2d _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users