From: Sascha S. <sc...@te...> - 2005-04-14 10:42:51
|
Hi, I already posted this some days ago to the list but I'm still hoping for = answers... I don't like the blackedge of the marker symbols very much. Therefore I c= hanged the markeredgewidth to zero. But this isn't the appropriate soluti= on because it makes the markers + and x vanish. Is there a possibilty for= the markeredge to inherit its color from the marker symbol? Thanks a lot, Sascha |
From: Robert L. <ro...@le...> - 2005-04-14 11:02:24
|
Sascha Schnepp wrote: > > I already posted this some days ago to the list but I'm still hoping for > answers... > > I don't like the blackedge of the marker symbols very much. Therefore I > changed the markeredgewidth to zero. But this isn't the appropriate > solution because it makes the markers + and x vanish. Is there a > possibilty for the markeredge to inherit its color from the marker symbol? > I'm not sure of your scenario, but you can specify that the marker edge and face colour are the same when calling the axes.plot() function, e.g. defaultMarkerColor = 'b' ax.plot(sx, sy, linestyle='None', markersize=defaultMarkerSize, marker='v', zorder='1', markerfacecolor=defaultMarkerColor, markeredgecolor=defaultMarkerColor) Note also that a line has a function set_markeredgecolor() where you can set the edge colour. HTH Robert |
From: Sascha S. <sc...@te...> - 2005-04-14 11:17:07
|
Am Thu, 14 Apr 2005 21:02:09 +1000 hast Du, Robert Leftwich <robert@leftw= ich.info>, mir dies geschrieben: > Sascha Schnepp wrote: >> >> I already posted this some days ago to the list but I'm still hoping f= or >> answers... >> >> I don't like the blackedge of the marker symbols very much. Therefore = I >> changed the markeredgewidth to zero. But this isn't the appropriate >> solution because it makes the markers + and x vanish. Is there a >> possibilty for the markeredge to inherit its color from the marker sym= bol? >> > > I'm not sure of your scenario, but you can specify that the marker edge= and face > colour are the same when calling the axes.plot() function, e.g. > > defaultMarkerColor =3D 'b' > ax.plot(sx, sy, linestyle=3D'None', markersize=3DdefaultMarkerSize, = marker=3D'v', > zorder=3D'1', markerfacecolor=3DdefaultMarkerColor, markeredgecolor=3Dd= efaultMarkerColor) That helped! Thank you! I often don't know which attributes can be used as kwargs... Greetings, Sascha > > Note also that a line has a function set_markeredgecolor() where you ca= n set the > edge colour. > > HTH > > Robert > --=20 -------------------------------------------------------------------------= -- Sascha Schnepp Institut f=FCr Theorie Elektromagnetischer Felder (TEMF) TU Darms= tadt Fachbereich Elektrotechnik und Informationstechnik Schlo=DFgartenstra=DFe 8 / D 64289 Darmstadt phone: +49 (0)6151 1= 6-2261 mailto:sc...@te... fax: +49 (0)6151 16-46= 11 http://www.temf.de PGP-Key: 0xF660E207 (04/15/05) Three o'clock is always too late or too early for anything you want to do. -- Jean-Paul Sartre -------------------------------------------------------------------------= -- |
From: John H. <jdh...@ac...> - 2005-04-14 15:07:28
|
>>>>> "Sascha" == Sascha Schnepp <sc...@te...> writes: Sascha> I often don't know which attributes can be used as Sascha> kwargs... Any Artist method that starts with 'set_' can be set with a kwarg. Eg, if set_markeredgecolor is a method, you can do markeredgecolor=something as a kwarg. Read through the classdocs at http://matplotlib.sourceforge.net/classdocs.html for the object of interest, eg for lines (Line2D), see http://matplotlib.sourceforge.net/matplotlib.lines.html Also, you can call set(object) on any object and it will return the current properties and their values (see also example/set_and_get.py) BTW, the set and get introspection functionality was recently moved out of the pylab interface and now resides in matplotlib.artist so API developers can use it as well In [1]: lines = plot([1,2,3]) In [2]: set(lines) alpha: float antialiased or aa: [True | False] clip_box: a matplotlib.transform.Bbox instance clip_on: [True | False] color or c: any matplotlib color - see help(colors) dashes: sequence of on/off ink in points data: (array xdata, array ydata) data_clipping: [True | False] figure: a matplotlib.figure.Figure instance label: any string linestyle or ls: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ] linewidth or lw: float value in points lod: [True | False] marker: [ '+' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' | 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|' ] markeredgecolor or mec: any matplotlib color - see help(colors) markeredgewidth or mew: float value in points markerfacecolor or mfc: any matplotlib color - see help(colors) markersize or ms: float transform: a matplotlib.transform transformation instance visible: [True | False] xclip: (xmin, xmax) xdata: array yclip: (ymin, ymax) ydata: array zorder: any number In [3]: |