SourceForge logo
SourceForge logo
Menu

matplotlib-devel

From: Erik T. <eri...@gm...> - 2008年02月10日 08:12:03
I noticed while making some plots with upper bound error bars that
whenever Axes.errorbars is called with any of the errorbars chosen as
upper or lower bounds, that the color cycle was off, skipping over 2
colors each time another errorbar plot was made (e.g. the first would
be green and the second would be cyan instead of blue,green,red,cyan).
Looking into the axes class, it appears that if you don't specify a
color and want the markers to be drawn over the errorbars, the color
cycle has already been skipped over one because of calls to draw the
markers into the plot. The solution is to change all the lines that
say " ls='None' " in the errorbar method to instead say " ls='k' " -
this will prevent those calls from cycling the colors, and hence only
the call to actually draw the markers will do so. Can this patch be
committed to svn?
From: Erik T. <eri...@gm...> - 2008年02月13日 05:46:42
Attachments: erikerrorbarfix.diff
After a little testing on the subversion repository, the attached diff
seems to work.
On Feb 10, 2008 12:12 AM, Erik Tollerud <eri...@gm...> wrote:
> I noticed while making some plots with upper bound error bars that
> whenever Axes.errorbars is called with any of the errorbars chosen as
> upper or lower bounds, that the color cycle was off, skipping over 2
> colors each time another errorbar plot was made (e.g. the first would
> be green and the second would be cyan instead of blue,green,red,cyan).
> Looking into the axes class, it appears that if you don't specify a
> color and want the markers to be drawn over the errorbars, the color
> cycle has already been skipped over one because of calls to draw the
> markers into the plot. The solution is to change all the lines that
> say " ls='None' " in the errorbar method to instead say " ls='k' " -
> this will prevent those calls from cycling the colors, and hence only
> the call to actually draw the markers will do so. Can this patch be
> committed to svn?
>
-- 
Erik Tollerud
Graduate Student
Center For Cosmology
Department of Physics and Astronomy
4155B Frederick Reines Hall
University of California, Irvine
Office Phone: (949)824-2996
Cell: (651)307-9409
eto...@uc...
From: Erik T. <eto...@uc...> - 2008年05月14日 17:26:26
It'd be nice to get this into the new release unless it has been
somehow fixed by some other code path in the latest svn... the line
numbers on the diff are no longer accurate, but the idea is still the
same - just change all lines of the form
caplines.extend( self.plot(leftlo, ylo,ls=None,
marker=mlines.CARETLEFT, **plot_kw) )
to
caplines.extend( self.plot(leftlo, ylo, 'k|', marker=mlines.CARETLEFT,
**plot_kw) )
e.g. change the ls=None to 'k|' and the color cycle is not
interrupted. I don't have the 1.1 numpy yet, so I haven't explicitly
tested it, but I don't see why anything would have changed...
On Tue, Feb 12, 2008 at 10:46 PM, Erik Tollerud <eri...@gm...> wrote:
> After a little testing on the subversion repository, the attached diff
> seems to work.
>
> On Feb 10, 2008 12:12 AM, Erik Tollerud <eri...@gm...> wrote:
>> I noticed while making some plots with upper bound error bars that
>> whenever Axes.errorbars is called with any of the errorbars chosen as
>> upper or lower bounds, that the color cycle was off, skipping over 2
>> colors each time another errorbar plot was made (e.g. the first would
>> be green and the second would be cyan instead of blue,green,red,cyan).
>> Looking into the axes class, it appears that if you don't specify a
>> color and want the markers to be drawn over the errorbars, the color
>> cycle has already been skipped over one because of calls to draw the
>> markers into the plot. The solution is to change all the lines that
>> say " ls='None' " in the errorbar method to instead say " ls='k' " -
>> this will prevent those calls from cycling the colors, and hence only
>> the call to actually draw the markers will do so. Can this patch be
>> committed to svn?
>>
>
>
>
> --
> Erik Tollerud
> Graduate Student
> Center For Cosmology
> Department of Physics and Astronomy
> 4155B Frederick Reines Hall
> University of California, Irvine
> Office Phone: (949)824-2996
> Cell: (651)307-9409
> eto...@uc...
>
-- 
Erik Tollerud
Graduate Student
Center For Cosmology
Department of Physics and Astronomy
2142 Frederick Reines Hall
University of California, Irvine
Office Phone: (949)824-2587
Cell: (651)307-9409
eto...@uc...
From: Manuel M. <mm...@as...> - 2008年05月16日 17:32:32
Erik Tollerud wrote:
> It'd be nice to get this into the new release unless it has been
> somehow fixed by some other code path in the latest svn... the line
> numbers on the diff are no longer accurate, but the idea is still the
> same - just change all lines of the form
> 
> caplines.extend( self.plot(leftlo, ylo,ls=None,
> marker=mlines.CARETLEFT, **plot_kw) )
> to
> caplines.extend( self.plot(leftlo, ylo, 'k|', marker=mlines.CARETLEFT,
> **plot_kw) )
> 
> e.g. change the ls=None to 'k|' and the color cycle is not
> interrupted. I don't have the 1.1 numpy yet, so I haven't explicitly
> tested it, but I don't see why anything would have changed...
> 
> On Tue, Feb 12, 2008 at 10:46 PM, Erik Tollerud <eri...@gm...> wrote:
>> After a little testing on the subversion repository, the attached diff
>> seems to work.
>>
>> On Feb 10, 2008 12:12 AM, Erik Tollerud <eri...@gm...> wrote:
>>> I noticed while making some plots with upper bound error bars that
>>> whenever Axes.errorbars is called with any of the errorbars chosen as
>>> upper or lower bounds, that the color cycle was off, skipping over 2
>>> colors each time another errorbar plot was made (e.g. the first would
>>> be green and the second would be cyan instead of blue,green,red,cyan).
>>> Looking into the axes class, it appears that if you don't specify a
>>> color and want the markers to be drawn over the errorbars, the color
>>> cycle has already been skipped over one because of calls to draw the
>>> markers into the plot. The solution is to change all the lines that
>>> say " ls='None' " in the errorbar method to instead say " ls='k' " -
>>> this will prevent those calls from cycling the colors, and hence only
>>> the call to actually draw the markers will do so. Can this patch be
>>> committed to svn?
>>>
>>
>>
>> --
>> Erik Tollerud
>> Graduate Student
>> Center For Cosmology
>> Department of Physics and Astronomy
>> 4155B Frederick Reines Hall
>> University of California, Irvine
>> Office Phone: (949)824-2996
>> Cell: (651)307-9409
>> eto...@uc...
>>
> 
> 
> 
Hi Erik,
 I don't see the color cycle broken in the latest svn version (but it 
might be broken in the 0.91 maintenance branch).
Manuel
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /