SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] small fix for colorbar

From: Eric F. <ef...@ha...> - 2007年05月28日 13:15:55
Jeff,
Your sensible change required one other, so I have committed both in rev 
3312.
Eric
Jeff Whitaker wrote:
> Eric: I came across what may be a small bug in colorbar. If you pass a 
> list to colorbar with the 'ticks' keyword, and the list is longer than 
> 10, you don't actually get the ticks at the locations you specify. This 
> patch seems to fix it:
> 
> --- colorbar.py 2007年04月09日 11:12:19.000000000 -0600
> +++ colorbar.py 2007年05月25日 12:20:20.000000000 -0600
> @@ -145,7 +145,7 @@
> self.solids = None
> self.lines = None
> if iterable(ticks):
> - self.locator = ticker.FixedLocator(ticks, nbins=10)
> + self.locator = ticker.FixedLocator(ticks, nbins=len(ticks))
> else:
> self.locator = ticks # Handle default in _ticker()
> if format is None:
> 
> 
> Notice that the Locator was being created with 10 bins, regardless of 
> how many ticks were being asked for.
> 
> If this looks OK I can commit.
> 
> -Jeff
> 

View entire thread

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 によって変換されたページ (->オリジナル) /