Re: [Matplotlib-users] how to draw text label for multi pie donuts

2014-06-19 Thread Mike Kaufman
use annotate() http://matplotlib.org/users/annotations_guide.html#plotting-guide-annotation M On 6/19/14, 12:27 AM, 不坏阿峰 wrote: > thanks to Joe Kington > ‘s help, i > got this pie donuts > i have modified code to generate pie base one t

Re: [Matplotlib-users] modifying a plot from an imported module

2014-06-16 Thread Mike Kaufman
Hi. The short answer is yes. orion:~ % cat A.py from matplotlib.pyplot import * print "A" plot([0,1],[0,1]) draw() orion:~ % cat B.py from matplotlib.pyplot import * import A print "B" plot([0.5,0.75],[0,1]) draw() show() Using ipython: In [2]: run -i B.py A B and the figure shows both pl

Re: [Matplotlib-users] writing subscripts with default matplot font

2014-06-12 Thread Mike Kaufman
use matplotlib's internal latex parsing: text(0.2,0.4,"text$_{\mathrm{subscript}}$") M On 6/12/14, 6:26 AM, Nemanja Savic wrote: > Hi all guys, > > I am not able to find answer on my question: how to write subscripts > using default matplotlib font? > > best, > > -- > Nemanja Savić > > > ---

Re: [Matplotlib-users] Make clear figure used in the powerpoint slides?

2014-04-21 Thread Mike Kaufman
Why not save to PDF? Drops straight into Powerpoint... M On 4/21/14, 4:50 PM, ChaoYue wrote: > OK, I tried but I don't really see the difference between jpg and png by > my eyes in the attached case, maybe for other more complicated plots > there will be real difference. Anyway, thanks to all for

Re: [Matplotlib-users] rasterized colorbar

2012-10-29 Thread Mike Kaufman
On 10/29/12 1:08 PM, Jody Klymak wrote: > > On Oct 28, 2012, at 17:47 PM, Eric Firing wrote: >> >> cb = colorbar() >> cb.solids.set_rasterized(True) > > > Great! Though I think it'd have taken me a while to figure that one out! I gotta agree. Is this (and the solids object) documented anywhere?

Re: [Matplotlib-users] Options for speeding up matplotlib, spectrogram with log scale axis, etc.

2012-10-09 Thread Mike Kaufman
On 10/9/12 10:03 PM, Jody Klymak wrote: > Hi Eric, > >> The pcolormesh docstring notes that it is >> much faster than pcolor; the pcolor docstring probably should refer >> people to pcolormesh, since matlab users are likely to go straight to >> pcolor without realizing that they should be using p

Re: [Matplotlib-users] drawing secondary x axis for months: a better way?

2012-10-08 Thread Mike Kaufman
On 10/8/12 11:03 PM, Paul Tremblay wrote: > I often have to make graphs with time series, with each point being the > start of a week. Below is the result I wish: > > However, in order to make the secondary x axis the the month labels, I > need something like 40 lines of code. My strategy consists

Re: [Matplotlib-users] Variable wspace and/or hspace?

2012-09-18 Thread Mike Kaufman
On 9/18/12 6:14 PM, Sean Lake wrote: > Hello all, > > I want to adjust the wspace used in a gridspec plot on a cell by cell > basis. Anyone have suggestions for how to do that? I haven't been > able to find an api to do that directly. The other possibility would > be to be able to embed a gridspec

Re: [Matplotlib-users] Scatter legend woes.

2012-06-13 Thread Mike Kaufman
On 6/13/12 4:06 PM, Steven Boada wrote: > > Well I am doing a lot more than this simple example shows. Point is that > there are nine different points each with their own legend entry. > > I could put it all out of the for loops, but it is all already written, > and I'd rather just fix the legend a

Re: [Matplotlib-users] Scatter legend woes.

2012-06-13 Thread Mike Kaufman
On 6/13/12 3:23 PM, Steven Boada wrote: > Whoops, I forgot to change the subject. Sorry list. > > List, > > I'm making a scatter plot using a for loop. Here's a simple example.. > > for i in range(10): > x=rand() > y=rand() > scatter(x,y,label='point') > > legend() > show() > > >

[Matplotlib-users] `patch` command for pyplot?

2012-06-13 Thread Mike Kaufman
I believe that the only way to add a patch is through ax.add_patch() Should there be an associated pyplot patch() command? M -- Live Security Virtual Conference Exclusive live event will cover all the ways today's securit

Re: [Matplotlib-users] how to maintain fractional minor tick spacing

2012-03-26 Thread Mike Kaufman
On 3/26/12 12:49 PM, Christopher Graves wrote: > On Sun, Mar 11, 2012 at 2:32 PM, Christopher Graves > mailto:christoph.gra...@gmail.com>> wrote: > Try this: > > from pylab import * > from matplotlib.ticker import AutoMinorLocator > > clf() > ax=subplot(111)

Re: [Matplotlib-users] how to maintain fractional minor tick spacing

2012-03-11 Thread Mike Kaufman
On 3/11/12 8:14 AM, cgraves wrote: > > Hi, here is an example script which places minor ticks with 2 per major tick > (minor tick spacing is "fractional" of major tick spacing with relative > interval of 1/2): > > from pylab import * > fig=figure() > ax=subplot(111) > ax.autoscale(tight=True) > plo

Re: [Matplotlib-users] How to Add Minor Ticks to Auto-Scaled Axis?

2011-06-21 Thread Mike Kaufman
I'm not sure exactly how you want your minor ticks, but you can try this LinearMinorLocator (which is not in the distribution yet). If you're conversant with git you can find the branch here: https://github.com/matplotlib/matplotlib/pull/122 M On 6/19/11 3:20 PM, matplotlib.coral...@xoxy.net

[Matplotlib-users] gridlines for one axis?

2011-03-31 Thread Mike Kaufman
how does one turn on gridlines for just the x-ticks or just the yticks? grid() just seems to do major or minor for both at the same time. M -- Create and publish websites with WebMatrix Use the most popular FREE web apps

[Matplotlib-users] use of data coordinates in axhline?

2011-03-25 Thread Mike Kaufman
What the best way to to use data coordinates rather than axes coordinates for xmin and xmax with axhline? Here's my kludgy solution, but it's not elegant: plot(arange(20)) ax = gca() inv = ax.transAxes.inverted() x = inv.transform(ax.transData.transform([10,0])) ax.axhline(10, xmax=x[0]) I tri

Re: [Matplotlib-users] Text box adaptable

2011-03-08 Thread Mike Kaufman
Is there an easy way to draw a piece of text (or whatever) to an off-screen or off-canvas buffer, figure out the size from that, and then use that to draw to the plot? M On 3/8/11 5:51 AM, Andrea Crotti wrote: > Goyo writes: > >> >> As Ben explained you need to draw first. So the usual path is