SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] colorbar extension size

From: Andrew D. <aj...@gm...> - 2011年11月17日 13:51:21
I forgot to include the link to the Github compare page in my last message:
http://github.com/ajdawson/matplotlib/compare/master...colorbar-extensions
Andrew
On 16 November 2011 12:19, Andrew Dawson <aj...@gm...> wrote:
> I would like some feedback on a new feature I have developed to control
> the length of colorbar extension triangles. This is a feature I have
> desired for some time, so that the plots I produce with matplotlib can be
> more consistent with those produced from other popular plotting software
> (e.g., IDL). I have added a new keyword argument, extendfrac, to the
> ColorbarBase class. This may be set to a scalar, a two-tuple, the string
> 'auto', or the string 'default'. The behaviour of this keyword depends on
> the setting of the existing spacing keyword argument.
>
> For spacing='uniform' or spacing='proportional':
> extendfrac=None - sets the lengths of both the minimum and maximum
> colorbar extension triangles to 0.05 times the interior colorbar length
> (the existing hard-coded setting).
> extendfrac='default' - same as None.
> extendfrac=FRACTION - sets the lengths of both the minimum and maximum
> colorbar extension triangles to the given fraction of the interior colorbar
> length.
>
> For spacing='uniform':
> extendfrac='auto' - sets the lengths of both the minimum and maximum
> colorbar extension triangles to be the same as the length of the interior
> boxes.
>
> For spacing='proportional':
> extendfrac='auto' - sets the length of the minimum colorbar extension
> triangle to the length of the left/bottom-most interior box, and the length
> of the maximum colorbar extension triangle to the length of the
> right/top-most interior box.
> extendfrac=(FRACTION1, FRACTION2) - as for FRACTION above but the
> minimum and maximum extension triangles may be different lengths.
>
> This is quite a small modification actually, but it does change the API
> for colorbars. I am wondering if this could be included in matplotlib? I
> have set up a fork of matplotlib on Github to implement this feature, if
> anyone thinks it is worth it...
>
> Andrew
>
>

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