Re: [Matplotlib-users] weird matplotlib imread question for png

2015-04-17 Thread Fabrice Silva
Le vendredi 17 avril 2015, oyster a écrit : Two 8bpp(Gimp, xnview say so) graylevel png files can be downloaded The first (ramp-gray.png) which gives right array shape is http://bbs.blendercn.org/data/attachment/forum/201504/17/090627ejhixti8vdthdnnn.png The second one (python-gray.png) which

Re: [Matplotlib-users] weird matplotlib imread question for png

2015-04-16 Thread Fabrice Silva
Le jeudi 16 avril 2015, oyster a écrit : Firstly, thanks, Fabrice Silva I have checked my picture files again. For python-gray.png, now it is attacched here or can be downloaded from http://bbs.blendercn.org/data/attachment/forum/201504/16/222351w3952n3o9968m9a5.png. xnview says

Re: [Matplotlib-users] svg format graph: lines out of box

2015-03-13 Thread Fabrice Silva
Le vendredi 13 mars 2015 à 13:41 +0100, Fabrice Silva a écrit : Le vendredi 13 mars 2015 à 10:59 +, Jens Nielsen a écrit : Which program is that screenshot from? It is likely due to a bug in that render. Since is displays normally in the browser. The plot lines are clipped behind

Re: [Matplotlib-users] svg format graph: lines out of box

2015-03-13 Thread Fabrice Silva
Le vendredi 13 mars 2015 à 10:59 +, Jens Nielsen a écrit : Which program is that screenshot from? It is likely due to a bug in that render. Since is displays normally in the browser. The plot lines are clipped behind the background but that obviously doesn't work correctly in that case.

Re: [Matplotlib-users] How to place an image colorbar next to the image when there are several subplots ?

2015-02-20 Thread Fabrice Silva
Le jeudi 19 février 2015 à 23:10 -0800, Peter Rowat a écrit : I apologize for asking such a trivial question, but I’ve spent a long time trying to fix this: I have a large 2D array that displays as an image, with a colorbar on the side. I also display 2 curves on top of the image. i.e. in

Re: [Matplotlib-users] adding legends

2014-10-20 Thread Fabrice Silva
Le lundi 20 octobre 2014 à 06:59 -0700, Tommy Carstensen a écrit : Does anyone know, how they were able to add the legend titles damped and oscillatory to this plot: http://matplotlib.org/examples/pylab_examples/legend_demo.html Hi, it seems to me that you are looking to some deprecated

Re: [Matplotlib-users] Selectable vertical lines

2014-01-07 Thread Fabrice Silva
Le mardi 07 janvier 2014 à 15:19 +0100, V. Armando Solé a écrit : Hello, I am trying to add some vertical lines into a matplotlib figure axes. The idea is to detect when the mouse passes over those lines in order to displace them following the mouse if the left button is pressed. I

Re: [Matplotlib-users] Selectable vertical lines

2014-01-07 Thread Fabrice Silva
Le mardi 07 janvier 2014 à 17:57 +0100, V. Armando Sole a écrit : What about using axvline with the picker argument? see http://matplotlib.org/users/event_handling.html I think axvline is part of the pyplot interface that I am not using. However your link is going to help me a lot. I

[Matplotlib-users] Postscript Level 2

2013-09-23 Thread Fabrice Silva
Hi, Is there a way to save figures as Language Level 2 Encapsulated PostScript ? Hard coded header in backends/backend_ps.py (Lines 1109 and 1278) writes: %!PS-Adobe-3.0 EPSF-3.0 but in the same module, there is an ambiguous: backend_version = 'Level II' Regards,

Re: [Matplotlib-users] How to change the textsize inside a legend?

2012-08-31 Thread Fabrice Silva
To avoid (not so) rude answer like Mark's one, please try first to refer to: - the documentation of the pyplot's commands you use http://matplotlib.sourceforge.net/api/pyplot_api.html It tries (pretty well IMHO) to be comprehensive, at least for 99% of use cases, - you can set, once for all, the

Re: [Matplotlib-users] How to change the size of the numbers under the axis

2012-08-30 Thread Fabrice Silva
Le jeudi 30 août 2012 à 19:48 +0200, Fabien Lafont a écrit : I just create two vectors from a .txt file and I plot them. I think I have the latest version of matplotlib. I have at least the last version of python(x,y) from pylab import* import matplotlib

Re: [Matplotlib-users] New tutorial (beginner level)

2012-08-10 Thread Fabrice Silva
of the example image. I see this behaviour too, on Chrome, version 20.0.1132.57. Same on epiphany 3.4.2 (webkit 1.8.1) -- Fabrice Silva -- Live Security Virtual Conference Exclusive live event will cover all

Re: [Matplotlib-users] Accelerating PDF saved plots

2012-07-05 Thread Fabrice Silva
/ -- Fabrice Silva -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint

Re: [Matplotlib-users] ginput with undefined number of points

2012-06-07 Thread Fabrice Silva
#matplotlib.pyplot.ginput Pressing [enter] also terminates the points acquisition. -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS 7051 -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security

Re: [Matplotlib-users] how does imshow() represent numpy array with origin = lower keyword ?

2012-05-31 Thread Fabrice Silva
Le jeudi 31 mai 2012 à 09:31 +0300, Yasin Selçuk Berber a écrit : im getting that result. but just wanted to know, could takes first row and put it most bottomthen take secondetc expression be accepted as harmless or not. Seems to, it depends on the interpretation of the expression :)

Re: [Matplotlib-users] specgram memory problem

2012-02-06 Thread Fabrice Silva
On Sat, Feb 4, 2012 at 9:44 AM, Fabrice Silva si...@lma.cnrs-mrs.fr wrote: Le vendredi 03 février 2012 à 17:39 +, David Craig a écrit : sure how to get it to plot the outputs from specgram. I use specgram as follows, Pxx, freqs, bins, im = plt.specgram

Re: [Matplotlib-users] specgram memory problem

2012-02-04 Thread Fabrice Silva
Le vendredi 03 février 2012 à 17:39 +, David Craig a écrit : sure how to get it to plot the outputs from specgram. I use specgram as follows, Pxx, freqs, bins, im = plt.specgram(..) what am I trying imshow?? plt.specgram computes the spectrogram and when calls imshow to display the

Re: [Matplotlib-users] specgram memory problem

2012-02-03 Thread Fabrice Silva
Le vendredi 03 février 2012 à 12:11 +, David Craig a écrit : Hi, I am using matplotlib to produce some spectrograms for seismic data. I am looking at a 10 day period with a sample rate of 20sps. I would like to have my spectrogram to be composed of 10 minute windows with an overlap of 90%.

Re: [Matplotlib-users] psd

2012-01-30 Thread Fabrice Silva
data length, and you would rather use a power of 2 for efficience. Do not use it to increase the frequency resolution (use pad_to instead). Fs = 100 NFFT = Fs*60*10 Pxx, f = plt.psd(data, NFFT, Fs, window=np.hanning(NFFT), NFFT/2) -- Fabrice Silva

Re: [Matplotlib-users] psd

2012-01-30 Thread Fabrice Silva
, detrend_mean, and detrend_linear) or use keyword arguments as I did in the example. -- Fabrice Silva -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers

Re: [Matplotlib-users] [matplotlib-users] How to plot y vs x with some missing points in y vector?

2012-01-27 Thread Fabrice Silva
What about masked arrays ? http://docs.scipy.org/doc/numpy/reference/maskedarray.html -- Fabrice Silva -- Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft

Re: [Matplotlib-users] Problem with ani.save

2011-12-29 Thread Fabrice Silva
=fname) ani.ffmpeg_cmd = gst_cmd -- Fabrice Silva -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual

Re: [Matplotlib-users] 1d plot of a discontinuous function

2011-09-30 Thread Fabrice Silva
= numpy.sign(x) * numpy.cos(x) axes = pyplot.gca() axes.set_ylim(-1.1, 1.1) pyplot.plot(x, y) idx = (x0) pyplot(x[idx],y[idx]) idx = numpy.logical_not(idx) pyplot(x[idx],y[idx]) -- Fabrice Silva -- All of the data

Re: [Matplotlib-users] How to use specgram() window function?

2011-09-20 Thread Fabrice Silva
Le lundi 19 septembre 2011 à 19:54 +0200, Klonuo Umom a écrit : I want to use kaiser window that's part of numpy for drawing spectrogram specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none, window=mlab.window_hanning, noverlap=128, cmap=None, xextent=None,

Re: [Matplotlib-users] How to use specgram() window function?

2011-09-20 Thread Fabrice Silva
, im = specgram(x, NFFT=1024, Fs=fs, window=wrapper, noverlap=2) a wrapper is needed as specgram expects a function with a single argument (as documented). -- Fabrice Silva -- All the data continuously generated in your

Re: [Matplotlib-users] How to use specgram() window function?

2011-09-20 Thread Fabrice Silva
/pyplot_api.html#matplotlib.pyplot.specgram and http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.imshow Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=win, noverlap=2, vmin=-120) -- Fabrice Silva

Re: [Matplotlib-users] Trying to reproduce R plot

2011-08-03 Thread Fabrice Silva
Le mercredi 03 août 2011 à 14:45 +0200, Michael Klitgaard a écrit : Hello, I really like Python and Matplotlib, and recommend it to all my colleagues. I have found this plot: http://en.wikipedia.org/wiki/File:Operating_system_usage_share.svg I think it looks good, it is made in R. The

Re: [Matplotlib-users] Memory increasing while plotting in loop

2011-06-17 Thread Fabrice Silva
',i,t,psi_Na, fig, image) print i plt.close() # EOF -- Fabrice Silva -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image

Re: [Matplotlib-users] Memory increasing while plotting in loop

2011-06-17 Thread Fabrice Silva
removes the children of the figure so that it has to delete the axes and its children (amongst which is the AxesImage) and create new ones when you invoke imshow again. -- Fabrice Silva -- EditLive Enterprise is the world's

Re: [Matplotlib-users] Memory increasing while plotting in loop

2011-06-17 Thread Fabrice Silva
Le vendredi 17 juin 2011 à 12:00 +0200, Fabrice Silva a écrit : Le vendredi 17 juin 2011 à 02:38 -0700, Alain Francés a écrit : Hi, This way the code creates empty images, it needs indeed some update where you inserted the comment. However I'm not sure that the benefit in term

Re: [Matplotlib-users] Memory increasing while plotting in loop

2011-06-17 Thread Fabrice Silva
) and create new ones when you invoke imshow again. I simply removed the clf command! It works now with this code (I just implemented fig.canvas.draw() as you indicated) So? what about timings and memory consumption? -- Fabrice Silva

Re: [Matplotlib-users] [Zoom function] bug in matplotlib ?

2011-03-30 Thread Fabrice Silva
Le mercredi 30 mars 2011 à 09:45 +0200, David Kremer a écrit : Hello, I'm using archlinux, with all up-to-date packages, and matplotlib within a python2 environment. When I use the zoom function, it seems the zoom is decreasing instead of increasing. Actually, the exact behaviour is to

Re: [Matplotlib-users] [Zoom function] bug in matplotlib ?

2011-03-30 Thread Fabrice Silva
Le mercredi 30 mars 2011 à 13:49 +0200, Joachim Saul a écrit : Fabrice Silva [03/30/2011 01:13 PM]: Are you aware of the «zoom out to rectangle» feature (with right click-n-drag, opposed to «zoom to rectangle» with left click-n-drag) ? http://matplotlib.sourceforge.net/users

Re: [Matplotlib-users] savefig not deducing file format

2011-03-25 Thread Fabrice Silva
Le mardi 15 mars 2011 à 11:30 +0100, Giovanni Luca Ciampaglia a écrit : Hi all, I call savefig by passing to it a file-like object but it appears to not get the graphics format right: f = open('not_a_pdf.pdf', 'w') plot([1,2,3]) savefig(f) but it produces a PNG image. Can anybody

Re: [Matplotlib-users] Getting the set of point actually plotted (from Sage)

2011-02-06 Thread Fabrice Silva
of the figure. Try: Fig = F.matplotlib() ax = Fig.get_axes()[0] # to get the first (and maybe only) subplot line = ax.get_axes()[0] xdata = line.get_xdata() ydata = line.get_ydata() -- Fabrice Silva -- The modern

Re: [Matplotlib-users] Inserting an Image into a Subplot

2010-10-24 Thread Fabrice Silva
... -- Fabrice Silva -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly

Re: [Matplotlib-users] ginput(0) termination error

2010-06-08 Thread Fabrice Silva
Le vendredi 04 juin 2010 à 15:25 +0200, Thøger Emil Juul Thorsen a écrit : Hello list; I'm new to python/matplotlib, migrating from IDL. I need to do some interactive point selection with mouse, and the pyplot.ginput() routine seemed to be just the right thing here. I do however need to be

Re: [Matplotlib-users] interpolate inside a circle

2010-05-26 Thread Fabrice Silva
Le mardi 25 mai 2010 à 21:47 -0300, Carlos Grohmann a écrit : Dears, I want to interpolate some irregular data using radial basis. Can I interpolate only the data that falls inside a circle (or a polygon)? May these pages help you? http://www.scipy.org/Cookbook/RadialBasisFunctions

Re: [Matplotlib-users] Matplotlib crashes on mouse event

2010-05-16 Thread Fabrice Silva
FIY, with the help of Sylvestre Ledru (debian atlas maintainer), the problem was solved installing libatlas3g-sse*. -- ___ Matplotlib-users mailing list

Re: [Matplotlib-users] Matplotlib crashes on mouse event

2010-05-15 Thread Fabrice Silva
I notice that the illegal instruction does not occur when the figure does not contain any axes. Fabrice -- ___ Matplotlib-users mailing list

Re: [Matplotlib-users] Matplotlib crashes on mouse event

2010-05-14 Thread Fabrice Silva
Some additional details $ python Python 2.5.5 (r255:77872, Apr 21 2010, 08:44:16) [GCC 4.4.3] on linux2 import numpy, matplotlib numpy.__version__, matplotlib.__version__ ('1.3.0', '0.99.1.1') and the output of lsof just before the pointer enters the canvas -- Fabrice Silva $ lsof |grep 6352

Re: [Matplotlib-users] Matplotlib crashes on mouse event

2010-05-14 Thread Fabrice Silva
daily update my debian and, on wednesday, the package libatlas3gf-base has been updated from 3.8.3-21 to 3.8.3-22. It seems that it had some side-effect on matplotlib behaviour... But why does the interpreter crash only when the pointer enters the figure canvas?? -- Fabrice Silva si...@lma.cnrs

[Matplotlib-users] Matplotlib crashes on mouse event

2010-05-13 Thread Fabrice Silva
package). Since then the crash occurs automatically. Even a complete remove/purge/install of the package does not solve the problem. Any idea? Matplotlib's developers? Sandro (Debian maintainer) ? -- Fabrice Silva LMA UPR CNRS 7051

Re: [Matplotlib-users] introducing mpl_toolkits.gridspec

2010-05-11 Thread Fabrice Silva
Le mardi 11 mai 2010 à 12:39 -0400, Jae-Joon Lee a écrit : 2) Do you plan on checking this into mpl trunk (still as a mpl_toolkit module)? Not at this moment. But, will consider if there is enough interest. +1 --

Re: [Matplotlib-users] Changes in mouse event

2009-11-13 Thread Fabrice Silva
the change in r7591 is linked to a change in a particular backend other than GTK*... -- Fabrice Silva Laboratory of Mechanics and Acoustics - CNRS 31 chemin Joseph Aiguier, 13402 Marseille, France. -- Let Crystal Reports

[Matplotlib-users] Changes in mouse event

2009-11-10 Thread Fabrice Silva
timeout, the selected points are output. Is it a bug related to the changes in 7591 ? -- Fabrice Silva Laboratory of Mechanics and Acoustics - CNRS 31 chemin Joseph Aiguier, 13402 Marseille, France. -- Let Crystal Reports

Re: [Matplotlib-users] download

2009-09-04 Thread Fabrice Silva
Strangely, the green button points to http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99/matplotlib-0.99.0-py2.5-macosx-10.3-i386.egg/download when I browse on a linux (debian) machine with epiphany (which uses gecko, the firefox engine). Why macosx ? -- Fabrice Silva Laboratory

Re: [Matplotlib-users] Delete Line legend from graph using matplotlib wxPython

2009-09-02 Thread Fabrice Silva
self.gex.remove() in delex function. An alternative is self.axes.get_lines()[-1].remove() so that you don't need self.gex for this. Now, you need a function to interactively select the line. I don't have a solution for that, but I'm interested too! -- Fabrice Silva Laboratory

Re: [Matplotlib-users] Zooming plot and transforms...

2009-07-04 Thread Fabrice Silva
is worth to be included as an mpl example. I'll push this into the svn if you don't mind. Great ! I assume a BSD license... -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS 7051 - équipe S2M

Re: [Matplotlib-users] Zooming plot and transforms...

2009-07-01 Thread Fabrice Silva
only and not in 0.98.x I tried to download the mpl.toolkits.axes_grid module files, but I had errors raising when importing that... -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS 7051

[Matplotlib-users] Zooming plot and transforms...

2009-06-29 Thread Fabrice Silva
Hello everybody, I wonder whether it is possible to produce something like the zooming plot example from http://code.enthought.com/projects/chaco/gallery.php using only matplotlib. I've done some tests, I think transforms may be helpful but I do not know ho to use them...

Re: [Matplotlib-users] Zooming plot and transforms...

2009-06-29 Thread Fabrice Silva
to find something looking like the 'zoom effect' Chaco provides... I merely wanted to add a Polygon patch between the upper and the lower subplots, but using data coordinates from these axes. -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS 7051

Re: [Matplotlib-users] Zooming plot and transforms...

2009-06-29 Thread Fabrice Silva
Le lundi 29 juin 2009 à 14:39 +0200, Fabrice Silva a écrit : I merely wanted to add a Polygon patch between the upper and the lower subplots, but using data coordinates from these axes. One more precision : my intent is to draw a figure 'statically', I do not need event handling, ie handling

Re: [Matplotlib-users] joined matplotlib today

2009-03-27 Thread Fabrice Silva
subplots, you may pay attention with the figure size, that you can define with the 'figsize' and 'dpi' keyword arguments of the figure function : http://matplotlib.sourceforge.net/api/pyplot_api.html?#matplotlib.pyplot.figure -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS 7051

Re: [Matplotlib-users] setting line parameters like color, lw, etc

2009-01-27 Thread Fabrice Silva
. As a solution, you may correct to valine, = plt.plot(valist) which unpack the list and extract the first item (the Line2D instance you want) to valine. -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS 7051 - équipe S2M

Re: [Matplotlib-users] how to get xlims after zooming

2008-12-29 Thread Fabrice Silva
, sharex=S1) S1, S2 and S3 will share the same x-range. -- Fabrice Silva si...@lma.cnrs-mrs.fr LMA UPR CNRS 7051 - équipe S2M -- ___ Matplotlib-users mailing list Matplotlib-users

[Matplotlib-users] Was: [SciPy-user] Plotting vector field + velocity magnitude in background

2008-11-11 Thread Fabrice Silva
Le lundi 10 novembre 2008, wbrevis a écrit : I'm trying to plot one of my experimental data using scipy. Until now, all the work I did was using Matlab. For one of my normal data- visualization, I read ASCII or Binary files containing 4 columns: The first contains the x coordinate, the second

Re: [Matplotlib-users] Axes.stem() doesn't draw stemlines if yscale is logarithmic

2008-07-14 Thread Fabrice Silva
. Is it possible do proceed as using axvline, i.e. specifying the axes coordinates? In this case, it would require a mix of data coordinate (the value to display) and of axes coordinate (the bottom of the curve). When would values to render be converted ? -- Fabrice Silva [EMAIL PROTECTED] LMA UPR

Re: [Matplotlib-users] Easy question: how to select specific subplot for second (or more) time

2008-06-10 Thread Fabrice Silva
Le mardi 10 juin 2008 à 09:27 -0400, Tony S Yu a écrit : Wow, a question I can actually answer: ax1 = subplot(211) ax2 = subplot(212) ax1.plot([1,2,3]) ax2.plot([4,3,2]) ax1.plot([3,2,1]) I do prefer Tony's solution, but in a more pylab'ic (matlab'ic) way, there is also:

Re: [Matplotlib-users] plotting data with nan

2008-05-22 Thread Fabrice Silva
Correction : In the matplotlibrc, I have : maskedarray : False -- Fabrice Silva [EMAIL PROTECTED] LMA UPR CNRS 7051 - équipe S2M - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual

Re: [Matplotlib-users] getting the min and max values of an axis for plotting

2008-05-13 Thread Fabrice Silva
Le lundi 12 mai 2008 à 11:08 +0200, Johann Cohen-Tanugi a écrit : hello, I have a function, which I am plotting. I want to add a line positioned at, say, the mean of the function, so I want to do plot([x,x],[y0,y1]). In order to get y0, and y1, my brute force trial and error browsing of the

Re: [Matplotlib-users] Problem with axvline

2008-03-05 Thread Fabrice Silva
is perfectly ok. (1) Has anyone experienced the same problem/bug in matplotlib? (2) Any idea of a possible fix? Since you turn hold to False, every new line that is added to axes (with plot() or axvline()) deletes the existing lines. Removing p.hold(False) may result in what you want. -- Fabrice Silva

Re: [Matplotlib-users] Looking for a way to save a graph

2007-11-05 Thread Fabrice Silva
Le vendredi 24 août 2007 à 11:30 +0200, David Tremouilles a écrit : OK I see... nothing straightforward... Best way for me is maybe to implement such a system myself: The system would collect the information to be saved by kind of introspection of the figure. I'm planning to save data and