SourceForge logo
SourceForge logo
Menu

Re: [matplotlib-devel] dropped spine support

From: Eric F. <ef...@ha...> - 2009年05月22日 00:47:37
Andrew Straw wrote:
> I've implemented initial support for "dropped spines". This is motivated
> by the ability to draw figures that look like
> http://jeb.biologists.org/cgi/content/full/211/3/341/FIG7 . I'm
> attaching the patches and an image created by the new example.
> 
> This is a somewhat invasive change into the core of the axis rendering
> code, so I'm hereby requesting a review before committing it into the
> code base. In particular, I dropped the idea of using Traits in MPL not
> because I think it's a bad idea, but because that would involve more
> substantial changes.
> 
> Anyhow, I'm attaching the proposed implementation as a series of
> patches. If the general form of this looks OK, I'd write up doc strings
> and a CHANGELOG entry and commit it. Should I wait until after the trunk
> release?
> 
> Please let me know what you think. All the examples run with
> exaples/tests/backend_driver.py still seem to give OK results, and the
> test suite raises a few more failures, but these appear due to
> (sub)pixel shifts in text rendering rather than anything more severe.
> 
> -Andrew
Andrew,
It looks like that nicely addresses a frequent request. Great! I 
haven't looked closely enough yet to see how it all works, but one 
immediate suggestion is that the adjust_spines function in your example 
looks like something that should be modified a bit and turned into an 
axes method with the usual pyplot wrapper. That is a fine point, of 
course, that can be deferred.
It looks like the offset is defined as positive outward from center of 
the plot. Are negative values allowed, so the spine goes through the 
middle of the plot, for example?
The name "spine" threw me off for a while; but I guess that is a 
reasonable description for a line with ticks. "Axis" and "Scale" are 
already taken, so maybe "spine" is as good as we can find. "Dropped 
spine" sounds like a painful medical condition... Oh, well...
Eric

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