Hey guys,
I’m a new guy in here and amazed by the capability
Matplotlib has. I have a question for you, which might be a result of my ignorance
or the limitation of the current Matplotlib. I’m trying to make a bar chart
with hundreds of bars at different x positions with their own y values (so
called mass spectra) and would like to have different colors for some of them,
but the bar colors were never changed to what I intended. Then, I realized because
each bar is so narrow I can’t see the color of the bars but only outside lines
(I see the colors by zooming it), which I couldn’t find a way to change
the color. My question is, is there any way either 1) to get rid of the outside
lines or 2) to change the color of the lines? Thanks much in advance!
Young Jin
Lee, Young-Jin wrote:
Hey guys,
I�m a new guy in here and amazed by the capability Matplotlib has. I have a question for you, which might be a result of my ignorance or the limitation of the current Matplotlib. I�m trying to make a bar chart with hundreds of bars at different x positions with their own y values (so called mass spectra) and would like to have different colors for some of them, but the bar colors were never changed to what I intended. Then, I realized because each bar is so narrow I can�t see the color of the bars but only outside lines (I see the colors by zooming it), which I couldn�t find a way to change the color. My question is, is there any way either 1) to get rid of the outside lines or 2) to change the color of the lines? Thanks much in advance!
For (1), use the linewidth=0 kwarg, e.g.:
barh(pos,val, align='center', linewidth=0)
Eric
···
Young Jin
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users