[Matplotlib-users] Mysterious "ValueError: zero-size array..."

2010-03-04 Thread David Goldsmith
Hi, folks! Let's see, first the tech stuff: Python version - 2.5.4; matplotlib version - 0.99.0; numpy version - 1.4.0; Platform: 32 bit Windows Vista Home Premium SP2. OK, now for the problem: imshow is (indirectly) raising "ValueError: zero-size array to ufunc.reduce without identity." He

[Matplotlib-users] Mysterious "ValueError: zero-size array..."

2010-03-04 Thread David Goldsmith
Hi, folks! Let's see, first the tech stuff: Python version - 2.5.4; matplotlib version - 0.99.0; numpy version - 1.4.0; Platform: 32 bit Windows Vista Home Premium SP2. OK, now for the problem: imshow is (indirectly) raising "ValueError: zero-size array to ufunc.reduce without identity." He

Re: [Matplotlib-users] Using callbacks to change Axes positions

2010-03-04 Thread Jae-Joon Lee
see http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg15919.html axes_grid toolkit provides some helper function that utilizes axes_locator (take a look at demo_locatable_axes_easy function in the example below) http://matplotlib.sourceforge.net/examples/axes_grid/demo_axes_

[Matplotlib-users] Mysterious "ValueError: zero-size array..."

2010-03-04 Thread David Goldsmith
Hi, folks! Let's see, first the tech stuff: Python version - 2.5.4; matplotlib version - 0.99.0; numpy version - 1.4.0; Platform: 32 bit Windows Vista Home Premium SP2. OK, now for the problem: imshow is (indirectly) raising "ValueError: zero-size array to ufunc.reduce without identity." He

[Matplotlib-users] Mysterious "ValueError: zero-size array..."

2010-03-04 Thread David Goldsmith
Hi, folks! Let's see, first the tech stuff: Python version - 2.5.4; matplotlib version - 0.99.0; numpy version - 1.4.0; Platform: 32 bit Windows Vista Home Premium SP2. OK, now for the problem: imshow is (indirectly) raising "ValueError: zero-size array to ufunc.reduce without identity." He

[Matplotlib-users] Using callbacks to change Axes positions

2010-03-04 Thread Thomas Robitaille
Hi, I am trying to set up a colorbar that automatically resizes if I zoom in to an image (which changes the aspect ratio of the axes, so I want the colorbar to get resized too). Let's say I have two Axes instances, say ax (for the main image) and cax (for the colorbar). I can set up a callback

[Matplotlib-users] Change colorbar orientation once drawn

2010-03-04 Thread Thomas Robitaille
Hi, I would like to change the orientation of a colorbar once it has already been drawn. So for example if I create the colorbar with: cb = fig.colorbar(mappable=image, cax=cax, orientation='vertical') I would like to be able to do cb.set_orientation('horizontal') Is there a way to do this, s

Re: [Matplotlib-users] Plotting boolean/logical data type

2010-03-04 Thread Jae-Joon Lee
Not sure what exactly you want. Is this close? ax = subplot(111) tr = ax.get_xaxis_transform() ax.plot([0.2, 0.8], [0.5, 0.5], transform=tr) The x-coodinate is in data coordinate, but y coordinate is in (normalized) axes coordinate. More about the transforms behind matplotlib can be foun

Re: [Matplotlib-users] Transform problem with fixed aspect ratio

2010-03-04 Thread Jae-Joon Lee
With axes aspect_ratio set, the position of the axes is determined during the drawing time. And the position of the inset axes also need to be adjusted during the drawing time to incorporate this, One way to archive this is to set axes_locator attribute, which accept a callable object that returns

Re: [Matplotlib-users] Plotting boolean/logical data type

2010-03-04 Thread Friedrich Romstedt
Do you want something like the attached? I created it with my package that no-one wants :-( >>> import diagram_cl >>> import diagram_cl.kernels.tk >>> import numpy >>> import Tkinter >>> d1 = diagram_cl.Diagram() >>> series = (numpy.random.random(100) > 0.5).astype(numpy.float) >>> for idx in xra

Re: [Matplotlib-users] colorbar on LEFT side of figure ?

2010-03-04 Thread Jeff Whitaker
Jim Vickroy wrote: > Hi, > > I have been unable to place a colorbar on the LEFT side of a figure. > For example, in the Gaussian noise with vertical colorbar > > > demo, how can the colorbar be positi

[Matplotlib-users] colorbar on LEFT side of figure ?

2010-03-04 Thread Jim Vickroy
Hi, I have been unable to place a colorbar on the LEFT side of a figure. For example, in the Gaussian noise with vertical colorbar demo, how can the colorbar be positioned on the left side of the fig

Re: [Matplotlib-users] how to insert a part of a plot in the same figure

2010-03-04 Thread kamaleon
Thanks you put it right, I wanted to know how to remove them inside the subplot. It is done. Cheers Matthias Michler wrote: > > On Thursday 04 March 2010 17:11:54 kamaleon wrote: >> Thanks Matthias, this seems help me. >> But how to remove the xlabel, ylable and the tilte in the subplot? >> Ch

[Matplotlib-users] Transform problem with fixed aspect ratio

2010-03-04 Thread Mike Kay
Hi list - I've got a need to add several axes instances (e.g., barplots) to an existing figure. These additional axes need to be placed relative to data points on that plot. A problem occurs if the aspect ratio of the parent axes is set to a fixed value rather than using 'auto'. The attached scr

Re: [Matplotlib-users] how to insert a part of a plot in the same figure

2010-03-04 Thread Matthias Michler
On Thursday 04 March 2010 17:11:54 kamaleon wrote: > Thanks Matthias, this seems help me. > But how to remove the xlabel, ylable and the tilte in the subplot? > Cheers > > Matthias Michler wrote: > > On Thursday 04 March 2010 13:35:12 kamaleon wrote: [...] Hi , what do you mean by xlabel, ylabel

Re: [Matplotlib-users] Older Version of Matplotlib for Python 2.2.1

2010-03-04 Thread Ben Axelrod
what kind of errors did you get when building on windows? I recently found out that Visual Studio is required to build MPL on windows. This is because MPL contains C++ sources. Additionally, you must have the same version of Visual Studio that was used to build Python. So if you installed py

Re: [Matplotlib-users] how to insert a part of a plot in the same figure

2010-03-04 Thread kamaleon
Thanks Matthias, this seems help me. But how to remove the xlabel, ylable and the tilte in the subplot? Cheers Matthias Michler wrote: > > On Thursday 04 March 2010 13:35:12 kamaleon wrote: >> Hey All, >> >> I have a fig, see attach image. I am plotting the number of infected >> nodes >> versus

[Matplotlib-users] Older Version of Matplotlib for Python 2.2.1

2010-03-04 Thread Schnappauf, Andreas
Hi there, I was searching for an older version of matplotlib for using it with python 2.2.1 (parts of the project can only be interpreted with this old version :(). Is there a package for an installation under windows (just like the current versions)? I tried to build 0.80 and 0.87 from the sour

Re: [Matplotlib-users] how to insert a part of a plot in the same figure

2010-03-04 Thread Matthias Michler
On Thursday 04 March 2010 13:35:12 kamaleon wrote: > Hey All, > > I have a fig, see attach image. I am plotting the number of infected nodes > versus time. Time is running from 0 to 100. > I need to insert a subplot in that figure that shows me the number of > infected nodes for time running from 0

[Matplotlib-users] how to insert a part of a plot in the same figure

2010-03-04 Thread kamaleon
Hey All, I have a fig, see attach image. I am plotting the number of infected nodes versus time. Time is running from 0 to 100. I need to insert a subplot in that figure that shows me the number of infected nodes for time running from 0 to 20 for example. If there is an example that can do the s

Re: [Matplotlib-users] Runtime customization of plots

2010-03-04 Thread François Beaubert
Andrea Gavana a écrit : Only the second approach slightly resembles what I have in mind. Navigating the plot using shortcuts and the MPL toolbars is less than 1% of what you can do to customize a MPL plot. Asking a user who knows nothing about Python (or programming in general) to use the IPython

Re: [Matplotlib-users] skipping mpl-axes-interaction during key_press_event's

2010-03-04 Thread Matthias Michler
On Wednesday 03 March 2010 19:10:10 Matthias Michler wrote: > Hello list, > > I'd like to bring something back, which was discussed in sep-dec 2008 "OSX > 10.5 event.key bug", which was initially posted by James Schombert. > > Did I miss any development in this field? > > I tried to implement the

Re: [Matplotlib-users] Problems seeing a png created with matplotlib in firefox

2010-03-04 Thread Alexander Dietz
Hi, thanks a lot for your help, tips and investigations, but I still have the problem. It looks like this cannot be reproduced somewhere else, but I found out that I can see image with a dpi larger than 64 in the figsave command. Anything with a dpi of 64 or smaller is just white. See: http://atl

[Matplotlib-users] Plotting boolean/logical data type

2010-03-04 Thread Timo Heine
Hello, I'v made a small program which plots data from a CAN-bus log file. Some of the data to plot is logical type on/off values (bit on or off). I have tried to find a way to plot this kind of data with no success. Basically what I want to do is to draw a horizontal line with relative y co-ordin