Re: [matplotlib-devel] matplotlib 0.98.0 colors problem LineCollection
Thanks. mpl was applying the default alpha of 1.0 to the set of colors rather than ignoring it when an alpha is provided for each color. This is now fixed in SVN r5554 Cheers, Mike Mátyás János wrote: > Hi, > > setting colors with transparency no longer works for me in > 0.98.0, but worked before in 0.91.3: > > c = matplotlib.collections.LineCollection(lines, colors = lineColors) > > This shows the lines only with the base colors without transparency. > > However, if I modify the code to the following, the colors shows > properly with transparency: > > c = matplotlib.collections.LineCollection(lines) > c.set_color(lineColors) > > > Mátyás János > > - > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > ___ > Matplotlib-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] Documentation: New plot directive
This probably isn't the "real" solution, but I've been using svn-clean to clean my doc directory. Though I agree with John, we should have a clear demarkation between svn content and generated content. Cheers, Mike Darren Dale wrote: > On Friday 13 June 2008 9:54:58 pm you wrote: > >> On Fri, Jun 13, 2008 at 3:20 PM, Darren Dale <[EMAIL PROTECTED]> >> > wrote: > >>> I just deleted the static_figs directory from svn, and moved the contents >>> into pyplots. The generated figures were committed to svn as well, so >>> they should not be auto-generated. This way we can consistently use the >>> nice plot directive to include all of our figures. I think there should >>> be no problems with this transition, but if you see one, please let me >>> know. >>> >> I think we can make it work, but there are some minor hurdles. It is >> a little brittle in my view to include auto-generated PNGs alongside >> svn pngs because it makes cleaning hard (we currently have the same >> problem in the _static dir with the mathtext pngs). >> > > How often does cleaning need to be done? Can "svn up" be a part of the > cleaning process? > > >> The other problem >> is that when I went to implement your svg suggestion, which is a good >> one (ditto for ps links), I bumped into some not implemented errors >> since we don't have draw_tex for svg and some latex runtime problems >> when I tried to build the ps since I don't have the right fonts. All >> of this can be worked around, but it will take a little work. I have >> to run now... >> >> We could have a little extra meta data stored, tagging certain files >> that should not be auto-generated for certain extensions >> Perhaps we should introduce a new plot directive option, much like >> include-source, which could be used to suppress auto-gen, or exclude >> certain targets. >> >> .. plot:: tex_unicode_demo.py >> >>:include-source: >>:no-autogen: >> >> .. plot:: tex_unicode_demo.py >> >>:include-source: >>:exclude-backends: svg, gdk >> >> I'll ponder this over the weekend. >> > > May I suggest a third alternative, :exclude-formats: instead of backends. > > Darren > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] polar title and related questions
Eric Firing wrote: > Mike, > > John's mention of an upcoming bugfix release brought to mind a glitch > in 0.98: the default position of the polar plot title is too low (as > is the default position of the title on an ordinary plot with > tick_top()). > > It looks like you were working on this with your autoLayout option, > but when I try enabling that, I get (last part of traceback only, and > for the Cartesian axes case): > > /usr/local/lib/python2.5/site-packages/matplotlib/axes.pyc in > update_layout(self, renderer) >1421 x0, y0, x1, y1 = self.get_position(True).extents >1422 # Adjust the title > -> 1423 self.titleOffsetTrans.clear().translate( >1424 0, original_t_text + pad_pixels * 2.0) >1425 > > AttributeError: 'ScaledTranslation' object has no attribute 'clear' > > > It looks like this would be prevented if ScaledTranslation were > reformulated to inherit from Affine2D instead of Affine2DBase. > > Is this the right solution? No -- Affine2D is for mutable transformations, and a ScaledTransformation is automatic (it really doesn't make sense to clear it). The real bug here is that the auto layout code has grown stale. It should probably remove it, since it was basically an aborted experiment and I don't want to create confusion. It turned out to be too difficult (perhaps impossible) to do the right thing in the general case given the current MATLAB-based APIs for laying out a figure. The real solution will need to provide a new API (which would be an alternative to the current one) that works somewhat like the box layout APIs in many GUI toolkits. Once I got to that point, I realised that would take more time beyond what I had allotted. > > Regardless of the status of the autoLayout code, I thought it would be > nice to improve the default title behavior of the polar_demo, at least. I've changed it so it behaves identically to 0.91.x, which is not great (since it puts the title too close to the edge of the figure), but at least it isn't a regression. Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel