[Matplotlib-users] x-axis Tick Label Alignment w/Cairo

2012-08-19 Thread Freddie Witherden
Hello, Using the Cairo backend with the following snippet: from matplotlib.figure import Figure from matplotlib.artist import setp from matplotlib.backends.backend_agg import FigureCanvasAgg from matplotlib.backends.backend_cairo import FigureCanvasCairo import numpy as np fig = Figure() ax1 = f

Re: [Matplotlib-users] axis default formatting with strange scientific-like notation

2012-08-19 Thread Phil Elson
I'm not aware of an rc param for this. The relevant github issue: https://github.com/matplotlib/matplotlib/issues/461 Regards, Phil On 19 August 2012 21:27, Christopher Graves wrote: > Using matplotlib 1.1.1. > If one runs the following code: > > from pylab import * > > plot([19.185,19.187],[

Re: [Matplotlib-users] for a log y axis, set_major_formatter then twiny() removes the set_major_formatter

2012-08-19 Thread Eric Firing
On 2012/08/19 10:31 AM, Christopher Graves wrote: > Hi > > > I do not think this is the expected behavior. First, run the following: > > > from pylab import * > > plot([0,3],[0.2,0.7]) > > ax1 = gca() > > ax1.set_yscale('log') > > gca().yaxis.set_major_formatter(FormatStrFormatter('$%g$')) > > #ax2

[Matplotlib-users] for a log y axis, set_major_formatter then twiny() removes the set_major_formatter

2012-08-19 Thread Christopher Graves
Hi I do not think this is the expected behavior. First, run the following: from pylab import * plot([0,3],[0.2,0.7]) ax1 = gca() ax1.set_yscale('log') gca().yaxis.set_major_formatter(FormatStrFormatter('$%g$')) #ax2 = ax1.twiny() #ax2.set_xlim(ax1.get_xlim()) show() You will see that t

[Matplotlib-users] axis default formatting with strange scientific-like notation

2012-08-19 Thread Christopher Graves
Using matplotlib 1.1.1. If one runs the following code: from pylab import * plot([19.185,19.187],[0.0009,0.0011],'b.') show() The x-axis is labelled 0.0005, 0.0010, 0.0015 etc +1.9184e1 This is unreadable and does not seem like a good default behavior! One can add gca().xaxis.set_major_form

Re: [Matplotlib-users] FancyBBox set_width

2012-08-19 Thread Goyo
2012/8/19 Peter Combs : > Hi all, > I'm trying to have a Text object with a fancy box, as in this example: > http://matplotlib.sourceforge.net/mpl_examples/pylab_examples/fancybox_demo2.py > . However, the key difference is that I want to have the box (in my case, > I'm interested in an RArrow) be

[Matplotlib-users] Legend frameon and tight bounding boxes

2012-08-19 Thread Freddie Witherden
Hello, With matplotlib 1.1.1 on Gentoo I have been observing some strange behaviour relating to ax.legend(frameon=False) and print_figure(bbox_inches='tight'): from matplotlib.figure import Figure from matplotlib.artist import setp from matplotlib.backends.backend_cairo import FigureCanvasCairo i

Re: [Matplotlib-users] FancyBBox set_width

2012-08-19 Thread Daniel Hyams
Another, very hacky but quick way to do this, is to put spaces around your text until the arrow is the size you desire: " your text " and if you want the arrow to expand upward and downward, put in return characters (I told you it was crude ;)) On Sun, Aug 19, 2012 at 2:41 AM,

Re: [Matplotlib-users] FancyBBox set_width

2012-08-19 Thread Daniel Hyams
I had to deal with this lately, and there is no current way to do what you want without patching the MPL source. I have a patch for it, but it does not behave well enough to use in the general senseand you have target the correct code, the lack of flexibility lies in the Text._draw_bbox functi

Re: [Matplotlib-users] space between bar and y-axis: works with 2 bars not with 3

2012-08-19 Thread Goyo
2012/8/17 mgurling : > I've attached 2.py and 3.py which differ only in how many bars are graphed. > The "nudge" variable was intended to move the left-most bar away from > the y-axis. Better use xlim to move the y-axis away from the bar: a = [20, 35] nudge = 0.2 ind = np.arange(2) + nudge width