Re: [Matplotlib-users] multi colored text

2013-10-30 Thread Paul Ivanov
A* \^ - ,./ _.`\\ / \ / ,--.S\/ \ / `"~,_ \\ __o ? _ \<,_ /:\ --(_)/-(_).../ | \ --...J Paul Ivanov http://pirsquared.org -- Android is

Re: [Matplotlib-users] How to undo "Zoom to Rectangle"?

2014-04-28 Thread Paul Ivanov
/ ,--.S\/ \ / `"~,_ \\ __o ? _ \<,_ /:\ --(_)/-(_).../ | \ --...J Paul Ivanov http://pirsquared.org -- "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instan

Re: [Matplotlib-users] How to undo Zoom to Rectangle?

2014-04-28 Thread Paul Ivanov
A* \^ - ,./ _.`\\ / \ / ,--.S\/ \ / `"~,_ \\ __o ? _ \<,_ /:\ --(_)/-(_).../ | \ --...J Paul Ivanov http://pirsquared.org -- "Accelerate

Re: [Matplotlib-users] matplot crases because of XDG_CONFIG_HOME variable

2014-05-15 Thread Paul Ivanov
seeing, please open a new one. best, -- _ / \ A* \^ - ,./ _.`\\ / \ / ,--.S\/ \ / `"~,_ \\ __o ? _ \<,_ /:\ --(_)/-(_)----.../ | \ ---

Re: [Matplotlib-users] ImportError: No module named _backend_gdk

2014-08-05 Thread Paul Ivanov
\/ \ / `"~,_ \\ __o ? _ \<,_ /:\ --(_)/-(_).../ | \ --...J Paul Ivanov ipython and matplotlib core developer http://pirsquared.org -- Infragistics Professional Build stunning WinForms apps today! Re

Re: [Matplotlib-users] how to generate one plot per key press?

2009-08-23 Thread Paul Ivanov
Try something like this: from os import sys from matplotlib import * from numpy.random import rand fig= pyplot.figure(figsize=(8,8), dpi=120) pyplot.show() while True: z= rand(20,20) pyplot.imshow(z) pyplot.draw() chr= sys.stdin.read(1) if chr=='q': break pyplot.cl

Re: [Matplotlib-users] how to generate one plot per key press?

2009-08-23 Thread Paul Ivanov
appologies - sys.stdin.read(1) blocks until you give it a new line () that' s probably what you were having problems with. Paul Ivanov, on 2009-08-23 01:14, wrote: > Try something like this: > > > from os import sys > from matplotlib import * > from numpy.rand

Re: [Matplotlib-users] create ListedColormap with different alpha values

2008-11-23 Thread Paul Ivanov
0.0, 0.790 In [6]: my_rgba_array= np.array( [ [ 1. , 1. , 1. ], [ 1. , 0. , 0. ]]) In [7]: myColormap = matplotlib.colors.ListedColormap(my_rgba_array) In [8]: myColormap.__call__(.1) Out[8]: (1.0, 1.0, 1.0, 1.0) In [9]: myColormap.__call__(.9) Out[9]: (1.0,

Re: [Matplotlib-users] create ListedColormap with different alpha values

2008-11-25 Thread Paul Ivanov
ar_scatter.py) best, Paul Ivanov John Hunter, on 2008-11-23 07:36, wrote: > On Sun, Nov 23, 2008 at 2:01 AM, Paul Ivanov <[EMAIL PROTECTED]> wrote: >> I took a stab at it, how does this look? >> >> I also took the liberty of adding alpha to LinearSegmentedColormap and

Re: [Matplotlib-users] Matplotlib or numpy bug?

2008-11-27 Thread Paul Ivanov
Hi Jesper, confirming the problem over here, as well. both numpy and mpl from svn (also on an Ubuntu 8.04 machine). good luck, Paul Jesper Larsen, on 2008-11-27 02:10, wrote: > Hi Eric and Mauro, > > Thanks for your answers. > > 2008/11/27 Eric Firing <[EMAIL PROTECTED]>: >> It looks OK to me

Re: [Matplotlib-users] Matplotlib or numpy bug?

2008-11-28 Thread Paul Ivanov
Eric Firing, on 2008-11-28 17:55, wrote: > Paul Ivanov wrote: >> Hi Jesper, >> >> confirming the problem over here, as well. both numpy and mpl from svn >> (also on an Ubuntu 8.04 machine). > > Just checking: did you do a clean build of numpy (deleting any old bu

Re: [Matplotlib-users] pylab, twinx, and displayed coordinates

2011-09-23 Thread Paul Ivanov
for the one that is the furthest back, and turn it off for all others lying on top of it. You can see what happens if you don't do this by omitting the calls to set_frame_on, and then verifying that the second line does not show up (because the original axes' frame patch is blocking it.

Re: [Matplotlib-users] Error when zooming manually with the mouse outside of the axes

2011-09-24 Thread Paul Ivanov
seful printed information leaves the screen. :) This problem was fixed by 2c924046 (Jim Radford 2011-03-08 15:07:23 -0800 459) and now reads: self.canvas.set_rubberband(int(x0), int(y0), int(x1), int(y1)) Please update either that line alone, or checkout the latest matplotlib sources from GitH

Re: [Matplotlib-users] pylab, twinx, and displayed coordinates

2011-09-24 Thread Paul Ivanov
] can you try explicitly swapping your axes? f.axes = [f.axes[1],f.axes[0]] instead of the call to reverse? > BTW, what's matplotlib.axes.AxesSubplot? I couldn't find this class. see SubplotBase class and subplot_class_factory function in matplotlib/axes.py best, -- Paul Ivano

Re: [Matplotlib-users] 0.99.1.2: error in afm.py

2011-10-21 Thread Paul Ivanov
sure that there isn't some stale pointer to an old version of matplotlib out there - so can you let us know what procedure you used to do the upgrade? best, -- Paul Ivanov 314 address only used for lists,  off-list direct email at: http://pirsquared.o

Re: [Matplotlib-users] 0.99.1.2: error in afm.py

2011-10-21 Thread Paul Ivanov
ter (Delete), and not meant to be a printable character. Maybe you already figured this out in following up with Ben, but if not, can you 'print fh.name' before the while 1: in _parse_char_metrics so we find out which .afm file is the culrpit -- Paul Ivanov 314 address only used for

Re: [Matplotlib-users] 0.99.1.2: error in afm.py

2011-10-23 Thread Paul Ivanov
On Sat, Oct 22, 2011 at 7:54 AM, Rich Shepard wrote: > On Fri, 21 Oct 2011, Paul Ivanov wrote: >   I will certainly add diagnostic code requested by you, Ben, and anyone > else and report the results when trying to run the model. I do need to fix > this and have no idea what's b

Re: [Matplotlib-users] 0.99.1.2: error in afm.py

2011-10-24 Thread Paul Ivanov
tplotlib? -- Paul Ivanov 314 address only used for lists,  off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 -- The demand for IT networking professionals continues to grow, and the demand for spe

Re: [Matplotlib-users] 0.99.1.2: error in afm.py

2011-10-24 Thread Paul Ivanov
have been seeing "Found an unknown keyword in AFM header (was Underline)" for the afm files that ship with matplotlib (but we were on your machine - so something changed them). Please diff your pagko8a.afm against https://raw.github.com/matplotlib/matplotlib/master/lib/matplotlib/mpl-d

Re: [Matplotlib-users] 0.99.1.2: error in afm.py

2011-10-24 Thread Paul Ivanov
On Mon, Oct 24, 2011 at 3:26 PM, Rich Shepard wrote: > On Mon, 24 Oct 2011, Paul Ivanov wrote: > >> those two properties should not have spaces in them - according the the >> AFM file spec that I could find - they should be one word - which is what >> matplotlib expects

Re: [Matplotlib-users] 0.99.1.2: error in afm.py

2011-10-25 Thread Paul Ivanov
'm sure it's as frustrating for you as it is for me. Well, I hope the dentist trip was more of a success :) Don't worry about it - it's become kind of a fun challenge now. I see you sent this just a few minutes ago - let's tr

Re: [Matplotlib-users] 0.99.1.2: error in afm.py [RESOLVED]

2011-10-25 Thread Paul Ivanov
On Tue, Oct 25, 2011 at 4:59 PM, Rich Shepard wrote: > On Tue, 25 Oct 2011, Paul Ivanov wrote: > >> I see you sent this just a few minutes ago - let's try to figure this out >> interactively via IRC on #matplotlib channel on freenode. If you don't >> have an

Re: [Matplotlib-users] set background of axes + labels

2011-11-11 Thread Paul Ivanov
els of the inner figure. > I've tried set_frame_on on the axis, set_frameon on the figure, > axisbg_color, and so on. Would it be sufficient to set the background color behind the text labels? If 'ax' is your inner axes, do: ax.yaxis.label.set_backgroundcolor('red') ax.

Re: [Matplotlib-users] legend border, frameon keyword

2011-11-11 Thread Paul Ivanov
Oops, didn't reply to list last time: On Fri, Nov 11, 2011 at 8:53 AM, Paul Ivanov wrote: > On Tue, Nov 8, 2011 at 4:49 PM, magurling wrote: >> >> I want a legend without the black border. I've tried a few things that have >> been suggested on this forum and else

Re: [Matplotlib-users] legend border, frameon keyword

2011-11-11 Thread Paul Ivanov
>> On Fri, Nov 11, 2011 at 8:53 AM, Paul Ivanov wrote: >>> might you be on an old matplotlib.__version__? On Fri, Nov 11, 2011 at 11:18 AM, magurling wrote: > This is probably it. I installed by "apt-get install" but keep getting > version 0.99.3 installed. &g

Re: [Matplotlib-users] legend border, frameon keyword

2011-11-11 Thread Paul Ivanov
hey were having along with how they resolved it, so that others can follow in their footsteps later. best, -- Paul Ivanov 314 address only used for lists,  off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 --

Re: [Matplotlib-users] constant spacing with griddata

2011-12-19 Thread Paul Ivanov
0, it's more like 20.1000+change, in ipython, run '%precision 20' to see what I mean. Either the np.linspace or the mpl code likely needs to change, because in mpl, the error gets raised when, effectively: dx = np.diff(xi) dx.max() - dx.min() > np.finfo(xi.dtype).resolu

Re: [Matplotlib-users] Speeding up pcolor plot

2011-12-20 Thread Paul Ivanov
ect in the plot, you might have to play around with changing the axis formatters (though there might be an easier way of doing that, which escapes me right now) best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/P

Re: [Matplotlib-users] contourf with rgba colours

2011-12-30 Thread Paul Ivanov
ng point, as I include a discussion on the limitation of mpl colormaps there. -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 signature.asc Descri

Re: [Matplotlib-users] Bug in griddata

2012-01-10 Thread Paul Ivanov
1.0001e-15 ipdb> I believe that this has to do with the limited precision and non-uniformity of the possible numbers represented by the floating point standard. The check for constant spacing likely should take into account and compare dx.ptp() to the average dx itself, or some

Re: [Matplotlib-users] WYSIWYG figure

2012-01-11 Thread Paul Ivanov
re instance, using something like: f.set_size_inches(plt.rcParams['figure.figsize'], forward=True) best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 -

Re: [Matplotlib-users] Grid problem?

2012-01-18 Thread Paul Ivanov
t it works as it should on your chosen backend. Can anyone else who has OS X verify David's error? David, it'd be useful to know what your matplotlib.__version__ is, as well as whether or not the error occurs on the latest version, if that's possible. best, -- Paul Ivanov 314 addr

Re: [Matplotlib-users] Eye patterns (Heat plot?)

2012-01-23 Thread Paul Ivanov
.shape = all_y.shape = -1 H, yedges, xedges = np.histogram2d(all_y, all_x, bins=100) extent = [xedges[0], xedges[-1], yedges[-1], yedges[0]] ax = plt.gca() plt.hot() ax.imshow(H, extent=extent, interpolation='nearest') ax.invert_yaxis() I'm attaching the two images for r

Re: [Matplotlib-users] plot_date() runtime error

2012-01-26 Thread Paul Ivanov
imilar to yours by first doing plot(1,0) before the plot_date call. Can you try to create a new figure just before the call to plot_date? best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.or

Re: [Matplotlib-users] (no subject)

2012-01-28 Thread Paul Ivanov
> index = np.intersect1d(lower, upper) > ax1.plot(x[index], y[index], linestyle='-', color=color, linewidth=2) Another way (if you're ok with only coloring the markers) would be to use ax1.scatter(x,y,c=colorlist) where the length of all three arguments is the same. Sca

Re: [Matplotlib-users] How matplotlib got me a job

2012-02-06 Thread Paul Ivanov
ss, now :) I want to second Ben's comments: I learned (and continue to learn) quite a bit about matplotlib by trying to answer the questions others have (with my trusty IPython tab-completion, and when necessary, doing what every Python Jedi does, and use the Source) - and by following along with

Re: [Matplotlib-users] Switch graphs

2012-02-07 Thread Paul Ivanov
100*np.random.rand(12), 100*np.random.rand(12), c=np.random.rand(12), s=np.random.rand(12)*100) plt.show() I don't want to take away all of your fun, so have a look at adding (mouse clickable) buttons to this using either examples/widgets/buttons.py or examples/widgets/ra

Re: [Matplotlib-users] Change xaxis labels

2012-02-07 Thread Paul Ivanov
putation. Take a look at this example: http://matplotlib.sourceforge.net/examples/api/date_index_formatter.html Just define something like: def your_function(x,pos=None): return "%d days" % (x/86400) ax.xaxis.set_major_formatter(ticker.FuncFormatter(your_function)) best, -- Paul I

Re: [Matplotlib-users] Partial coloring of text in matplotlib

2012-02-07 Thread Paul Ivanov
ation=90,va='bottom',ha='center',**kw) text.draw(fig.canvas.get_renderer()) ex = text.get_window_extent() t = transforms.offset_copy(text._transform, y=ex.height, units='dots') plt.figure() rainbow_text(0.5,0.5,"all unicorns poop rainbows ! ! !"

Re: [Matplotlib-users] How matplotlib got me a job

2012-02-08 Thread Paul Ivanov
o open up. I'm still rather enjoying this whole thread, thanks for opening up. I got worried how relatively quiet it's been here for a few months, and glad we're starting to buck that trend. best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsq

Re: [Matplotlib-users] Figure zoom crosshair color

2012-11-13 Thread Paul Ivanov
ld be possible. An alternative, of course, would be to change the colormap you're plotting with, or add an alpha value to the images you're plotting so that the black widgets can be seen. Maybe it's inelegant, but looks like the path of least resistance... best, -- Paul Ivanov 314 ad

Re: [Matplotlib-users] Figure zoom crosshair color

2012-11-15 Thread Paul Ivanov
't mind me forwarding the correspondence to the list for posterity. > Again, thanks for your help. > Happy to be helpful, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7

Re: [Matplotlib-users] Varying alpha in ListedColormap not working

2012-12-05 Thread Paul Ivanov
version__ ? I think that code only made it's way into v1.2.0 (the latest stable), and was did not make it into v1.1.1 (or anything before it) -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirs

Re: [Matplotlib-users] help, installing matplotlib on mac 10.8

2013-04-21 Thread Paul Ivanov
back, remove all but the last few bits of the file path (since other folks won't necessarily be installing to the extact path you've installeed to), and feed it to google. The first google hit for "_path.so: no matching architecture in universal wrapper" is this stackoverflow post:

[Matplotlib-users] another example of gradient color lines

2013-04-22 Thread Paul Ivanov
, map_name in enumerate(plt.cm.cmap_d): plot_gradient_hack((0, i), (1, i), cmap = map_name, linewidth=4) plt.text(1,i, map_name, va='center') # comment out this last line to plot al

[Matplotlib-users] better way to change spine and ticklabel colors?

2010-06-07 Thread Paul Ivanov
example here: http://pirsquared.org/blog/2010/06/07/ca-prop/ best, Paul Ivanov -- I only use the 314 gmail account for mailinglists. Please send off-list personal correspondence to my initials (two letters) at berkeley dot edu. -

Re: [Matplotlib-users] Case stories of software including Matplotlib

2010-07-27 Thread Paul Ivanov
e is needed for the Phoenix project and their arrival at Mars will be in March sometime, but they are doing their testing in the coming few months. This annotation feature is used on reports that present the analysis of the trajectory to the navigation team and it shows up on o

[Matplotlib-users] aligning multiple legends

2010-09-06 Thread Paul Ivanov
_to_anchor=(.85,.85)) leg2 = ax2.legend(loc='upper left', borderaxespad=0, bbox_to_anchor=(.85,.85)) thanks in advance, Paul Ivanov -- This SF.net Dev2Dev email is sponsored by: Show off your paralle

Re: [Matplotlib-users] aligning multiple legends

2010-09-06 Thread Paul Ivanov
Paul Ivanov, on 2010-09-06 18:01, wrote: > I want to have two legends (from different axes) positioned right up > against on another. > > Here's a static example, except I want the second legend to be defined > relative to the first (if leg is moved, I want leg2 to move as w

[Matplotlib-users] closing figure inside a callback seg faults

2010-10-15 Thread Paul Ivanov
l of them cause crashes. Am I missing something? I'm using 1.0.0 with WXAgg thanks, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 --

Re: [Matplotlib-users] unwanted label clipping in gallery

2010-10-27 Thread Paul Ivanov
r Lab #1, it's called lab1.py (but actually links to lab1.txt): <http://redwood.berkeley.edu/wiki/VS265:_Homework_assignments> -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 --

Re: [Matplotlib-users] unwanted label clipping in gallery

2010-10-29 Thread Paul Ivanov
Alan G Isaac, on 2010-10-28 21:29, wrote: > On 10/27/2010 8:21 PM, Paul Ivanov wrote: > >def onelegend_twinaxes(axis,twin): > >#make a joint axis legend > >lines = twin.get_lines() > >lines.extend(axis.get_lines()) > >label

Re: [Matplotlib-users] how to get legend size, try #2.

2010-10-29 Thread Paul Ivanov
it to this and the devel list - they (frustratingly) don't send you your own copy back when you post something. I usually verify that the post went through my checking gmane or sourceforge archives. best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared

Re: [Matplotlib-users] how to get legend size, try #2.

2010-10-29 Thread Paul Ivanov
nates using l = plt.legend() bbox = l.get_window_extent() bbox.width,bbox.height or in axes coordinates using something like bbox2 = bbox.transformed(l.axes.transAxes.inverted()) bbox2.width,bbox2.height The bboxes have other handy attributes like p0,p1,x0,x1,y0,y1 etc, as well as methods like

Re: [Matplotlib-users] One legend, two axes?

2010-12-15 Thread Paul Ivanov
.get_lines()) labels = [l.get_label() for l in lines] leg = ax.legend(lines, labels) # or, alternatively... leg2 = plt.figlegend(lines,labels,loc='center') this is a slight revision to what was previously discussed here: <http://old.nabble.com/aligning-multiple-legends-td29

Re: [Matplotlib-users] starting with pplots

2010-12-22 Thread Paul Ivanov
example and it's source code: http://matplotlib.sourceforge.net/mpl_toolkits/mplot3d/tutorial.html#scatter-plots for your purposes, the code will be something like: from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111, projecti

Re: [Matplotlib-users] bug with twinx and scientific style

2010-12-23 Thread Paul Ivanov
milar problem for twiny() - but ax.xaxis does not appear to have .set_offset_position() method. > I've had this issue with versions .99, 1.0.0, running on Linux > (Ubuntu, versions 9.04 through to 10.10). me too, and I kept forgetting to report it. > PS. what's wrong with the sf.ne

Re: [Matplotlib-users] ODP: starting with pplots

2010-12-23 Thread Paul Ivanov
use a boolean mask. from numpy.random import rand, randint import matplotlib.pyplot as plt x,y = rand(2,100) z = randint(1,6,100) for i,c,m in zip(range(1,6),'rgbmk', 'odp*s'): mask = z==i plt.plot(x[mask],y[mask], color=c, marker=m) hope that helps, -- Paul Ivanov 314

Re: [Matplotlib-users] manipulating histogram data from hist function

2010-12-27 Thread Paul Ivanov
t plt.step(edges[1:],h) # plot as step lines instead of bars plt.step(edges[1:]+10,h) # same as above, with an offset best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 sign

Re: [Matplotlib-users] Drawing a circle around a letter

2010-12-28 Thread Paul Ivanov
et to get the job done, but I couldn't figure out a way to get my last two examples to do something similar by just manipulating the transforms. Hopefully someone chimes in with a better solution. For more on transformations see: http://matplotlib.sourceforge.net/users/transforms_tutorial.html

Re: [Matplotlib-users] Control of thread/program not returning to ipython after creating a plot.

2010-12-31 Thread Paul Ivanov
.com/ipython/ipython/issues/issue/237 but if you think the WX backend is also affected - it might just be that you're not starting ipython with the -pylab flag to get the threading to work without blocking. Can you try starting "ipython -pylab -gthread" and "ipython -pylab -wt

Re: [Matplotlib-users] How to make a grid of (plot) grids?

2011-01-03 Thread Paul Ivanov
tlib.sourceforge.net/examples/pylab_examples/spine_placement_demo.html best -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 signature.asc Description: Digital signature ---

Re: [Matplotlib-users] How to make a grid of (plot) grids?

2011-01-04 Thread Paul Ivanov
Gf B, on 2011-01-04 12:31, wrote: > On Mon, Jan 3, 2011 at 3:53 PM, Paul Ivanov wrote: > Gf B, on 2011-01-03 15:23, wrote: > > > Can such a "grid of grids" be done with matplotlib? If so, could someone > > > show me how? > > > > You'll be

Re: [Matplotlib-users] defining a custom RGB colormap

2011-01-05 Thread Paul Ivanov
ation='horizontal') In [216]: cb3.set_label("colormap interval 0.0-1.0") In [217]: plt.draw() And to further clarify that we did the right thing, let's adjust the xlim on that original plot. In [221]: ax2.set_xlim(norm(14),norm(40)) Out[

Re: [Matplotlib-users] semilogy

2011-01-05 Thread Paul Ivanov
cator._base Out[2]: 10.0 > 2) I'd like the major ticks to be solid lines, and minor ticks > to be dashed. I got all dashed. In [3]: plt.grid(which='major', linestyle='solid') In [4]: plt.grid(which='minor', linestyle='dashed') -- Paul Ivanov 31

Re: [Matplotlib-users] defining a custom RGB colormap

2011-01-05 Thread Paul Ivanov
el('"percent"') cb2 = mpl.colorbar.ColorbarBase(ax2, cmap=newcm, orientation='horizontal') cb2.set_label("colormap interval 0.0-1.0") plt.subplots_adjust(hspace=.7, bottom=.2) #comment out the next line to see t

Re: [Matplotlib-users] Setting tick colors on a Polar plot for a circumplex

2011-01-11 Thread Paul Ivanov
;) is what you can use to set the grid line color (and other aspects, like linewidth, linestyle, alpha, etc). hope that helps, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 signature.asc Description: Digital signature

Re: [Matplotlib-users] Newbie: How to control space between sets of bars in bar chart

2011-01-12 Thread Paul Ivanov
nd how you're offsetting each year, there's just not room left between the indexes that you're using. Just change your ind assignment line to this: ind = np.arange(0, 2*N, 2) this spaces your indexes out more. hope that helps, -- Paul Ivanov 314 address only used for lists, off

Re: [Matplotlib-users] sensible tick labels for log scale?

2011-01-12 Thread Paul Ivanov
ator to locator, but you can quickly figure it out in ipython using tab completion in IPython once you grab a given locator object. best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 signature.asc De

Re: [Matplotlib-users] Hidding plots

2011-01-13 Thread Paul Ivanov
d then call set_visible(False) on every member of that list. lines = plot_date([2000.10,2000.20,2000.30],[1,2,3]) [l.set_visible(False) for l in lines] or something like this to toggle visibility on and off [l.set_visible(not l.get_visible()) for l in lines] best, -- Paul Ivanov 314

Re: [Matplotlib-users] sensible tick labels for log scale (rephrased)

2011-01-13 Thread Paul Ivanov
NullFormatter, thus no labels will be placed at the minor tick locations. That would be a reasonable way to proceed - set the major ticks to be non-overlapping, and put the minor ones everywhere else. You've probably already found it, but just in case: http://matplotlib.sourceforge.net/api/ti

Re: [Matplotlib-users] Analog of processing map() or protovis scale?

2011-01-16 Thread Paul Ivanov
http://matplotlib.sourceforge.net/api/colors_api.html#matplotlib.colors.Normalize 2. http://matplotlib.sourceforge.net/api/colors_api.html#matplotlib.colors.LogNorm -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0

Re: [Matplotlib-users] ColorbarBase usage

2011-01-17 Thread Paul Ivanov
fancier, with the AxesGrid toolkit [2] 1. http://matplotlib.sourceforge.net/users/gridspec.html 2. http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/index.html#toolkit-axes best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7

Re: [Matplotlib-users] Alpha not working from imshow?

2011-01-17 Thread Paul Ivanov
h axes subplot, which is what you were seeing through the transparent portion of your masked array image. best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 signature.asc Description: Digital signature ---

Re: [Matplotlib-users] what does numRows, numCols in subplot docs mean?

2011-01-18 Thread Paul Ivanov
From: Paul Ivanov To: Larry Evans Cc: Bcc: Subject: Re: [Matplotlib-users] what does numRows, numCols in subplot docs mean? Reply-To: In-Reply-To: <4d32e05d.4090...@suddenlink.net> X-PGP-Key: http://pirsquared.org/PaulIvanov0F3E28F7.asc Larry Evans, on 2011-01-16 06:11, wrote: >

Re: [Matplotlib-users] UNIX_import pyplot:_path.so: symbol _ZNSs4_Rep20_S_empty_rep_storageE:referenced symbol not found

2011-01-18 Thread Paul Ivanov
numpy since you last built matplotlib? Can you try deleting ../site-packages/matplotlib, and the build/ directory for your sources of mpl1.0.1 and reinstall? Please report back either way so we get a handle on this. best, -- Paul Ivanov 314 address only used for lists, off-list direct email at:

Re: [Matplotlib-users] rcParams['figure.dpi'] has no effect?

2011-01-21 Thread Paul Ivanov
change to rcParams only affected the displayed resolution, not the resolution of saved files. Quoting from .matplotlibrc # the default savefig params can be different from the display params # Eg, you may want a higher resolution, or to make the figure # background white #savefig.dpi

Re: [Matplotlib-users] Legend for contour plots

2011-01-21 Thread Paul Ivanov
tead of calling legend on your 'lines' variable as you had it, do this: actual_lines = [cs.collections[0] for cs in lines] plt.legend(actual_lines, text) As you note, the call to plt.countour does not return lines, it returns contour sets (which is

Re: [Matplotlib-users] Suggestions for auto scaling fonts , etc for producing images at various scales

2011-01-21 Thread Paul Ivanov
feeling is that there shouldn't be a need to use ImageMagick - but depending on the size and dpi of your desired figures, is the problem that the text is not being antialiased? best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/P

Re: [Matplotlib-users] Suggestions for auto scaling fonts , etc for producing images at various scales

2011-01-21 Thread Paul Ivanov
Daryl Herzmann, on 2011-01-21 16:41, wrote: > On Fri, Jan 21, 2011 at 4:15 PM, Paul Ivanov wrote: > > > I guess I'm not sure what you meant by the fonts looking 'nasty', > > so if font.size doesn't address your issue, could you post a > > small examp

[Matplotlib-users] Automatic subplot_params for fitting label text (was Re: Suggestions for auto scaling fonts ,

2011-01-21 Thread Paul Ivanov
etc for producing images at various scales) Reply-To: In-Reply-To: <20110121232036.GA26739@ykcyc> X-PGP-Key: http://pirsquared.org/PaulIvanov0F3E28F7.asc Paul Ivanov, on 2011-01-21 15:20, wrote: > I'm almost certain that one *can* write a function to do this > pro grammaticall

Re: [Matplotlib-users] a break in the y-axis

2011-01-22 Thread Paul Ivanov
mething you really want, though, you can achieve it by making your own projection/scale: http://matplotlib.sourceforge.net/devel/add_new_projection.html Yet another way would be to re-label the tick lines (e.g. make .6 label be 1.0 and subtract that offset from your two outliers. best, -- Paul Ivanov 31

Re: [Matplotlib-users] Installing from svn

2011-01-22 Thread Paul Ivanov
gt;>> mpl.__path__ > ['matplotlib'] > > >>> mpl.__file__ > 'matplotlib/__init__.pyc' Hi Glen, what directory are you in when you're doing this? > >>> mpl.__path__ > ['matplotlib'] suggests that you're importing from some

Re: [Matplotlib-users] a break in the y-axis

2011-01-22 Thread Paul Ivanov
Paul Ivanov, on 2011-01-22 18:28, wrote: > Ilya Shlyakhter, on 2011-01-22 19:06, wrote: > > Is it possible to create a "break" in the y-axis so that it has ticks > > for value 0-.2, then ticks for values .8-1.0, but devotes only a token > > amount of space to

Re: [Matplotlib-users] a break in the y-axis

2011-01-24 Thread Paul Ivanov
Eric Firing, on 2011-01-22 17:49, wrote: > >> Paul Ivanov, on 2011-01-22 18:28, wrote: > > Paul, > > Your example below is nice, and this question comes up quite often. If > we don't already have a gallery example of this, you might want to add > one. (Prob

Re: [Matplotlib-users] X and Y label position in axes_grid1.AxesGrid/ImageGrid

2011-01-24 Thread Paul Ivanov
#x27;bar') grid2[0].xaxis.label.set_visible(True) # tmp workaround grid2[1].xaxis.set_label_position('top') grid2[1].xaxis.set_label_text('bar') grid2[0].yaxis.set_label_position('right') grid2[0].yaxis.set_label_text('foo') grid2[1].yaxis.set_label_position('

Re: [Matplotlib-users] labels in ax = Axes3D(fig) are not aligned in parallel

2011-01-24 Thread Paul Ivanov
can do to change the angle manually? # prevent the automatic rotation caused by view changes ax.yaxis.set_rotate_label(False) ax.yaxis.label.set_rotation(45) Beware that you'll have to adjust that angle on a per-view basis to get things to look right. best, -- Paul Ivanov 314 address only

Re: [Matplotlib-users] floating bar chart?

2011-01-24 Thread Paul Ivanov
ugarFloater.gif Hi Che, just specify the 'bottom' keyword argument to bar. Note that the second parameter is height of the bar, *not* the top of the bar plt.bar([1,2,3,4], [2,2.5,5,3], bottom=[0,-1,1,2]) best, -- Paul Ivanov 314 address only used for lists, off-list direct email at

Re: [Matplotlib-users] colorbar+log+latex

2011-01-25 Thread Paul Ivanov
the outline cbar.outline.set_visible(False) cbar.ax.set_frame_on(True) plt.draw() best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 signature.asc Description: Digital signature ---

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-26 Thread Paul Ivanov
which isn't an allowed date, hence the error. Change your bar line to this (I also added align='center', but you can remove it if you want): > #comment in bot = times.min().round() ax.bar(x, times-bot, bottom=bot, align='center') > > ax.yaxis_date() > fig.autofmt

Re: [Matplotlib-users] pyplot: Extract contourset without plotting

2011-01-27 Thread Paul Ivanov
erence between using pyplot and using the object-oriented api here: http://matplotlib.sourceforge.net/faq/usage_faq.html On the other hand, if you just want the contour to not show up, you can pass it alpha=0.0 to make it completely transparent and invisible (but it's still there) contourset =

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-27 Thread Paul Ivanov
such that this can work? (For some reason > I have not had nearly this much confusion with plotting lines, just > bars). Che, just make a numpy array out of your two lists, and you'll be able to subtract one from the other. import numpy as np top = np.array(top) bot = np.array(bot) be

Re: [Matplotlib-users] pyplot: Extract contourset without plotting

2011-01-27 Thread Paul Ivanov
;ll have to look at what QuadContourSet._contour_args does internally to see what what x, y, z should be, and then create a contour using C = matplotlib.contour._cntr.Cntr(x,y,z) and then for each level, do something like what QuadContourSet._get_allsegs_and_allkinds does C.trace(..) best, --

Re: [Matplotlib-users] Limits with errorbar

2011-02-01 Thread Paul Ivanov
p.sin(x) > > err = np.random.random(100) > > > > plt.errorbar(x,y, yerr=err, color='g',linestyle='None',xuplims=True) > > plt.show() Hi Francesco, > > plt.errorbar(x,y, yerr=err, color='g',linestyle='None',xuplims=True) I'm not sure w

Re: [Matplotlib-users] Problem with matshow and yticks: the rows of a matrix drawn by matshow does not have equal height

2011-02-01 Thread Paul Ivanov
on fairly recent checkout of svn trunk, so it may be an issue that was recently fixed. one workaround would be to set the ylim after the call to yticks, like this: plt.ylim(3.5, -0.5) best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsqu

Re: [Matplotlib-users] Custom colormap is inconsistent. What is wrong?

2011-02-01 Thread Paul Ivanov
Jeremy Conlin, on 2011-02-01 16:48, wrote: > I'm trying to create a custom colormap used with pcolormesh, but the > results seem inconsistent to me. I want the following colors > > -3 < x <= -2 - Black > -2 < x <= -1 - Blue > -1 < x <= 0 - Yellow > 0 < x <= 1 - Green > 1 < x

Re: [Matplotlib-users] fixing overlapping annotations

2011-02-01 Thread Paul Ivanov
used to implement such functionality: http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://

Re: [Matplotlib-users] fixing overlapping annotations

2011-02-01 Thread Paul Ivanov
Paul Ivanov, on 2011-02-01 17:14, wrote: > Kris Kuhlman, on 2011-02-01 18:03, wrote: > > I am trying to plot a large number of locations that need to be labeled. > > Often the locations are quite clustered and the resulting text is > > unreadable. I have been lookin

Re: [Matplotlib-users] Is it possible to plot axes with arrows ?

2011-02-03 Thread Paul Ivanov
From: Paul Ivanov To: Francois Maltey Cc: cc: Subject: Re: [Matplotlib-users] Is it possible to plot axes with arrows ? Reply-To: In-Reply-To: <4d496f84.7070...@nerim.fr> X-PGP-Key: http://pirsquared.org/PaulIvanov0F3E28F7.asc Francois Maltey, on 2011-02-02 15:51, wrote: > Hell

Re: [Matplotlib-users] hide labels

2011-02-06 Thread Paul Ivanov
Francesco Montesano, on 2011-02-04 17:01, wrote: > Dear all again, > > I've tried to play with it again, but I couldn't find a > solution for the problem. For clarity I report an example of > what each of the subplots looks like: Hi Francesco, thanks for the clarification, here are two ways to

  1   2   >