SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S





1
(10)
2
(3)
3
(5)
4
(7)
5
(18)
6
(4)
7
(15)
8
(7)
9
(10)
10
(4)
11
(18)
12
(15)
13
(11)
14
(11)
15
(4)
16
(28)
17
(17)
18
(22)
19
(12)
20
(19)
21
(17)
22
(14)
23
(4)
24
(3)
25
(6)
26
(8)
27
(13)
28
(11)
29
(21)
30
(3)
31
(5)






Showing results of 339

<< < 1 .. 3 4 5 6 7 .. 14 > >> (Page 5 of 14)
From: Darren D. <dd...@co...> - 2006年12月21日 11:03:55
On Thursday 21 December 2006 5:04 am, Giorgio Luciano wrote:
> I've searched a bit in the FAQ, since in the last days I'm struggling
> with the show and close command.
> I've got a function that calculate values to plot. I calculate plot, use
> show command and everything goes fine.
> I close the figure recalculate values and then replot and everything
> freezes because the show command seems still active.
> I've tried to start IDLE using -n option but no solution. the plots
> freezes and I loose all calculations, and then I have to restart. reload
> etc..
> I tried also to turn interactive off but no way of solving.
>
> I'm using WIN XP
> python 2.5
> numpy 1.01
> scipy 0.52
> matplotlib 0.87.7
>
> and I don't want to come back to matlab :) Since in matlab it's very
> common to calculate something, recalculate, plot etc. etc.
Try setting interactive : True in your matplotlibrc file, and restart your 
idle -n session. Then you shouldn't even need to use the show() command, the 
behavior will be very similar to matlab.
Darren
From: Giorgio L. <gio...@ch...> - 2006年12月21日 10:04:13
I've searched a bit in the FAQ, since in the last days I'm struggling 
with the show and close command.
I've got a function that calculate values to plot. I calculate plot, use 
show command and everything goes fine.
I close the figure recalculate values and then replot and everything 
freezes because the show command seems still active.
I've tried to start IDLE using -n option but no solution. the plots 
freezes and I loose all calculations, and then I have to restart. reload 
etc..
I tried also to turn interactive off but no way of solving.
I'm using WIN XP
python 2.5
numpy 1.01
scipy 0.52
matplotlib 0.87.7
and I don't want to come back to matlab :) Since in matlab it's very 
common to calculate something, recalculate, plot etc. etc.
Any help would be very appreciated.
If needed I can post function and file I'm using in .tar
Giorgio
From: Paul C. <pau...@un...> - 2006年12月21日 08:36:17
Hi everybody,
I am trying to perform interpolation on 2d data ( irregular or not) and=20
I am wondering if there is a way to get the interpolated results which=20
are obtained with the imshow command. This would allow a very complete=20
interpolation command with many options. The available functions (=20
griddata, interp2d..) only provides few possibilities for the=20
interpolation process.
Thanks
--=20
Paul Cristini
Charg=E9 de recherche CNRS
UMR5212-Mod=E9lisation et Imagerie en G=E9osciences
Universit=E9 de Pau et des Pays de l'Adour
BP 1155 -- 64013 PAU Cedex
Tel: (33) (0)5 59 40 76 27
Fax: (33) (0)5 59 40 74 15
From: Eric F. <ef...@ha...> - 2006年12月21日 07:24:53
Ganesh V wrote:
> Hi!
> 
> I have a problem with contour plots. See the two plots at
> 
> http://www.ae.iitm.ac.in/~ae03b007/downloads/matlab.jpg
> http://www.ae.iitm.ac.in/~ae03b007/downloads/matplotlib.jpg
> 
> The names show how they are generated. It's the same data obviously. Why 
> the difference. I am dealing with a 161*241 grid and followed 
> instructions given in the 3D plotting with matplotlib cookbook page of 
> scipy.org <http://scipy.org>. Any parameter to be changed ? MATLAB keeps 
> crashing like hell.. I want to get rid of it asap !!
Offhand, it looks like maybe you reshaped your 161*241 into a 241*161 so 
that it is all scrambled up. Are you taking into account the fact that 
Matlab stores matrices in Fortran order (first index increases fastest) 
and numpy by default in C order (last index increases fastest)? One way 
to check your array is by plotting slices through it: e.g., 
"plot(A[:,100])" and "plot(A[60,:])". But you really have not provided 
much information to go on. The best way to get help on something like 
this is to provide a small self-contained script, generating its own 
data, that shows the problem. Specify what matplotlib version you are 
using and on what kind of machine. Update matplotlib if it is not 
current (although in the present case I am pretty sure that the problem 
is the input you are giving contourf, not a problem with any past 
version of it). Also please look at examples/contour_demo.py and 
examples/contourf_demo.py from the matplotlib distribution, and verify 
that you can run them and understand them.
Eric
From: Ganesh V <gan...@gm...> - 2006年12月21日 05:44:29
Hi!
 I have a problem with contour plots. See the two plots at
http://www.ae.iitm.ac.in/~ae03b007/downloads/matlab.jpg
http://www.ae.iitm.ac.in/~ae03b007/downloads/matplotlib.jpg
The names show how they are generated. It's the same data obviously. Why the
difference. I am dealing with a 161*241 grid and followed instructions given
in the 3D plotting with matplotlib cookbook page of scipy.org. Any parameter
to be changed ? MATLAB keeps crashing like hell.. I want to get rid of it
asap !!
bye !
ganesh
-- 
Ganesh V
Undergraduate student,
Department of Aerospace Engineering,
IIT Madras, Chennai-36.
My homepage --> http://www.ae.iitm.ac.in/~ae03b007
My blog --> http://gantech.wordpress.com
From: Mike C. <mc...@st...> - 2006年12月20日 23:03:27
Hi,
I am using matplotlib within a wxPython app. I have a class called 
plotDialog that inherits from wx.Dialog and contains a matplotlib 
FigureCanvas. Several types of plot classes derive from plotDialog 
and bring up pretty windows displaying data of various sources.
What I want to do is write a routine which generates a "report" -- 
namely a combination of multiple plots and some text. The format could be:
1. One colossal plotDialog with tons of stuff in it in subplots 
(hopefully implemented some other way besides duplicating all of the 
individual plot routines within one dialog).
2. A word (or some other format) document with a bunch of jpegs 
pasted into it (best)
3. A dialog with a bunch of jpegs pasted in to it.
Can anyone suggest a way to do this? Can python output images to a 
document (multiply, not just saving one jpeg)? Can matplotplib or 
wxPython paste an image from the clipboard (I know I can copy to it)?
Thanks for any ideas,
-mike
From: Christopher B. <Chr...@no...> - 2006年12月20日 20:05:40
My key question is this:
Can't Visio import ANY standard vector graphics format: SVG, EPS, PDF, 
something? Or, for that matter, some Visio specific format that is a 
file format, rather than using COM to drive Visio itself.
I'm sure you considered this, but I'd be interested to know what went 
into the decision to do it this way.
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Alan G I. <ai...@am...> - 2006年12月20日 18:47:26
On 2006年12月20日, John Hunter apparently wrote: 
> I added this to svn.
Thanks!
> When I got into the code, I saw there is already a way to 
> do this: 
> line.set_dashes((None, None)) 
Yes, in 0.87.7, this works. Thanks!
(Note that it works only for a tuple,
not for a list.)
Cheers,
Alan
PS Why you might want to do this:
across figures I want to set a consistent
set of line styles, globally specifying a list of
dash styles, one for every line.
From: John H. <jdh...@ac...> - 2006年12月20日 18:30:08
>>>>> "Alan" == Alan G Isaac <ai...@am...> writes:
 Alan> On 2006年12月20日, John Hunter apparently wrote:
 >> Is this expected? I wouldn't expect it.
 Alan> It is pretty standard. See e.g. the PostScript Language
 Alan> Reference Manual. And, how else to set a solid line with
 Alan> set_dashes?
I added this to svn. When I got into the code, I saw there is already
a way to do this:
 line.set_dashes((None, None))
JDH
From: John H. <jdh...@ac...> - 2006年12月20日 18:25:04
>>>>> "Alan" == Alan G Isaac <ai...@am...> writes:
 Alan> It is pretty standard. See e.g. the PostScript Language
 Alan> Reference Manual. And, how else to set a solid line with
 Alan> set_dashes?
I didn't know that about postscript. I can easily implement it if it
is "the right thing to do (tm)". But it never occurred to me to
implement a solid line with set_dashes. I would tend to do
 line.set_linestyle('-')
Since it is part of postscript, I'll make it the default for mpl too.
JDH
From: Alan G I. <ai...@am...> - 2006年12月20日 18:19:39
On 2006年12月20日, John Hunter apparently wrote: 
> Is this expected? I wouldn't expect it. 
It is pretty standard.
See e.g. the PostScript Language Reference Manual.
And, how else to set a solid line with set_dashes?
Cheers,
Alan Isaac
From: John H. <jdh...@ac...> - 2006年12月20日 18:06:46
>>>>> "Alan" == Alan G Isaac <ai...@am...> writes:
 Alan> If ln is a Line2D then ln.set_dashes([]) does not give the
 Alan> expected solid line. version: 0.87.7
Is this expected? I wouldn't expect it. set_dashes is supposed to
take an even length sequence of off-on ink. Perhaps it should raise
an exception for an empty list.
JDH
From: Alan G I. <ai...@am...> - 2006年12月20日 17:56:31
If ln is a Line2D then
ln.set_dashes([])
does not give the expected solid line.
version: 0.87.7
Cheers,
Alan Isaac
From: Darren D. <dd...@co...> - 2006年12月20日 17:24:09
Hi David,
On Wednesday 20 December 2006 12:17, David Levitan wrote:
> I'm trying to use the qt4agg backend and running into performance issues
> (both using matplotlib interactively and in a program). The performance
> of qtagg and gtkagg backends are fine and drawing a zoom rectangle, for
> example, is smooth. With qt4, however, dragging and zooming are very
> choppy. Is this is known bug and is there any way to work around this?
It may be an issue with your installation of qt4/PyQt4. Panning and zooming 
are both quite fast for me. I'm using qt-4.2.2 and PyQt-4.1 on a 64bit gentoo 
linux machine.
Darren
From: David L. <da...@dl...> - 2006年12月20日 17:17:34
Hi,
I'm trying to use the qt4agg backend and running into performance issues 
(both using matplotlib interactively and in a program). The performance 
of qtagg and gtkagg backends are fine and drawing a zoom rectangle, for 
example, is smooth. With qt4, however, dragging and zooming are very 
choppy. Is this is known bug and is there any way to work around this?
Thanks,
David
From: Giorgio L. <gio...@ch...> - 2006年12月20日 14:11:17
I've done some prograss about visualising my plots from a function, but 
after searching in the FAQ and also in the amiling list archive i dint' 
find any solution to this.
I have a function that computes some data for a plot. I call the 
function and then use show.
Everything work fine.
Then I close all the figure (closing manually windows) and also using 
close() in the console (using IDLE) then I rerun the function because I 
need to make some changes.
But when I restart the function the precedent show() seems still active 
and make me all plots freeze.
Is there a way to "clean" the memory of matplotlib without restarting 
the shell. Because if I restart shell obviously I loose all the data the 
I need for redoing the calculation.
Any help very appreciated.
Giorgio
From: Toon V. <Too...@UG...> - 2006年12月20日 13:18:40
Attachments: Toon.Verstraelen.vcf
Darren Dale wrote:
> On Wednesday 20 December 2006 6:38 am, Toon Verstraelen wrote:
>> Hi,
>>
>> Is it possible to make multiline labels with mathtext? When I try this:
>>
>> pylab.title(r"$(a+b)^2\\(a-b)^2$")
>>
>> only the first line is rendered. Is there a way to do this properly?
> 
> It looks like this isn't possible right now with regular mathtext. I suggest 
> filing a request on the matplotlib sourceforge site, or even better, 
> submitting a patch. In the meantime, your example works with usetex: True.
> 
> Darren
Ok, I will take a look at it. Is the suggested syntax with the double 
backslash satisfactory? Should the patch be written for mathtext or for 
mathtext2?
greetz,
Toon
From: Darren D. <dd...@co...> - 2006年12月20日 12:28:22
On Wednesday 20 December 2006 4:34 am, Nils Wagner wrote:
> How can I use amsmath in matplotlibrc ?
amsmath is not currently supported.
Darren
From: Darren D. <dd...@co...> - 2006年12月20日 12:27:00
On Wednesday 20 December 2006 6:38 am, Toon Verstraelen wrote:
> Hi,
>
> Is it possible to make multiline labels with mathtext? When I try this:
>
> pylab.title(r"$(a+b)^2\\(a-b)^2$")
>
> only the first line is rendered. Is there a way to do this properly?
It looks like this isn't possible right now with regular mathtext. I suggest 
filing a request on the matplotlib sourceforge site, or even better, 
submitting a patch. In the meantime, your example works with usetex: True.
Darren
From: Toon V. <Too...@UG...> - 2006年12月20日 11:38:42
Attachments: Toon.Verstraelen.vcf
Hi,
Is it possible to make multiline labels with mathtext? When I try this:
pylab.title(r"$(a+b)^2\\(a-b)^2$")
only the first line is rendered. Is there a way to do this properly?
thanks,
Toon
From: Giorgio L. <gio...@ch...> - 2006年12月20日 09:36:47
I've succeded in solving the problem that seems due to usage of show.
Both of the function i called had a show function enabled that seems to 
confuse a bit the behaviour of matplotlib.
so I commented in both function show and only put it in the module that 
called both function.
Not to comfortable if you have to call a lot of function that use show 
command but it worked :)
Giorgio
From: Nils W. <nw...@ia...> - 2006年12月20日 09:34:41
 Hi,
How can I use amsmath in matplotlibrc ?
I would like to add a legend((r'$\det{\boldsymbol P}$')).
Nils
From: Achim G. <Ach...@ph...> - 2006年12月20日 08:59:00
Attachments: MatplotlibPrintGTK.py
Hi there!
I implemented a Print method with gtk-2.10 PrintOperations... It was not
easy, because of some transformations issues inside matplotlib...
My wish is: The plot window navigation bar should provide a print button
in future. I think many people are missing this button.
Here, I want to provide code for printing the screen, just like the save
button on the navigation bar.
It is the merge of the save button's code and the code in
pygtk-2.10.1/examples/pygtk-demo/demos/print_editor.py
Maybe, there is already a lot of print code available for other GUI
backends, if it will be shared, it could become part of matplotlib...
Yours, Achim
(Sorry, I could not provide a running program, because I am short in
time. The code is working in a bigger project
http://www.fkp.physik.tu-darmstadt.de/damaris/ )
From: David C. <da...@ar...> - 2006年12月20日 08:09:20
John Hunter wrote:
>
>
> David> In make_image, most of the time is taken into to_rgba:
> David> almost half of it is taken in by the take call in the
> David> Colormap.__call__. Almost 200 ms to get colors from the
> David> indexes seems quite a lot (this means 280 cycles / pixel on
> David> average !). I can reproduce this number by using a small
> David> numpy test.
>
> David> On my laptop (pentium M, 1.2 Ghz), make_image takes almost
> David> 85 % of the time, which seems to imply that this is where
> David> one should focus if one wants to improve the speed,
>
> This may have been lost in the longer thread above,
I am a bit lost myself between numpy and mpl ML, sorry for the 
inconvenience.
> but what
> interpolation are you using? You may see a good performance boost by
> using interpolation='nearest'. 
At what point is interpolation used ?
> Also, with your clip changes and with
> Eric's changes is it still painfully slow for you
Painfully is a strong word :) It is still 10 to 15 times slower than 
matlab on the same computer: the show call is around 800 ms instead of 
70 ms with matlab, and matlab image is equivalent to imshow + show calls 
actually. Matlab having only one toolkit, it obviously has an advantage, 
but I don't think the problem is on the GUI side anyway.
> -- how much have
> these changes helped? 
With the original profiling, it took a bit more than 2100 ms for a show 
call after a imshow call for a 8000x256 array according to a saved 
kcachegrind profile. Now, it is around 800 ms, which is already much 
better, and with minimal changes (eg without using a special fast path 
more prone to bugs). I estimate that squeezing to a bit less than 500 ms 
should be easily possible by improving on numpy side (clip, float to int 
convertion and take function), which has the nice effect of improving 
mpl without touching one line of it, and improving numpy as the same time :)
The last 500 ms would be much more difficult to squeeze: half of it is 
used to 'launch' the figure anyway. And below a few hundred ms, it is 
becoming unnoticeable in interactive use (whereas the change from 2.1 s 
to 0.8 is; on my laptop, it is even more noticeable, because its CPU is 
kind of slow).
David
From: John H. <jdh...@ac...> - 2006年12月19日 17:19:44
>>>>> "Lionel" == Lionel Roubeyrie <lro...@li...> writes:
 Lionel> Arg, I hoped that you would not say that :-) Le Mardi 19
It's not too bad, actually:
from pylab import figure, show, nx, cm
from matplotlib.transforms import blend_xy_sep_transform
fig = figure()
ax = fig.add_subplot(111)
X = 100*nx.mlab.randn(256,256)
im = ax.imshow(X, cmap=cm.jet)
cax = fig.colorbar(im)
labels = (100., 'peak1'), (-100, 'peak2')
trans = blend_xy_sep_transform(cax.transAxes, cax.transData)
for y, label in labels:
 cax.text(-0.05, y, label, ha='right', va='center', transform=trans)
show()
6 messages has been excluded from this view by a project administrator.

Showing results of 339

<< < 1 .. 3 4 5 6 7 .. 14 > >> (Page 5 of 14)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /