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



Showing results of 492

<< < 1 .. 6 7 8 9 10 .. 20 > >> (Page 8 of 20)
From: Scott R. <s.r...@gm...> - 2010年03月21日 19:42:14
Hi,
Python crashes on one of my computers when I execute: *import pylab*
All I need to do is execute this one line of code and poof.
A dialog pops up stating that "python.exe has encountered a problem and
needs to close.
We are sorry for the inconvenience....
I installed matplotlib version 0.99.1 using python xy. However I
encountered this same
problem when I installed using the python 2.6.4 and
matplotlib-0.99.1.win32-py2.6 installers.
Running python using verbose output shows that a problem is encountered when
the statement
*import matplotlib.transforms # precompiled from
C:\Python26\lib\site-packages\matplotlib\transforms.pyc*
is reached. This may be the culprit.
Thanks for any help,
Scott
From: Ryan M. <rm...@gm...> - 2010年03月21日 19:31:13
On Sun, Mar 21, 2010 at 1:36 PM, Eric Firing <ef...@ha...> wrote:
> Ryan May wrote:
>> That's because it wasn't there. :) I've ported it to make better use
>> of matplotlib facilities that are now available and added it to SVN.
>> In general, however, the gallery is the best place to look because we
>> should be keeping it up to date with changes in the code.
>>
>> I attached the modified script since it won't show up in the gallery
>> right away. I'd take a look, because it drastically simplifies the
>> colormapping.
>
> Nice!
>
> Would you also edit the cookbook, please? You could just point to your new
> example; and maybe include a version with a more typical colormap and norm,
> giving a smooth gradation.
There actually was an example there already showing the nice smooth
gradient of colors. I've cleaned up that example and added that to
SVN as well. I kept the discrete example as it shows nicely the use of
listed colormaps and boundary norms, which aren't used in a lot of
examples.
I've updated the recipes on scipy.org to reflect our examples, as well
as putting a link to the gallery.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: AG <com...@go...> - 2010年03月21日 19:29:47
Gökhan Sever wrote:
>
>
> On Sun, Mar 21, 2010 at 1:57 PM, AG <com...@go... 
> <mailto:com...@go...>> wrote:
>
> Hi List
>
> I cannot figure out how to satisfy this issue to resolve the
> ValueError:
> x and y must have same first dimension.
>
>
> This is the relevant code:
> [code]
>
> for i in range( 0, time + 1 ):
>
> outflow = constant * quantity
>
> quantityChange = inflow - outflow
>
> changeList.append( quantityChange )
>
> print "%2d %9.2f %11.3f %11.3f %10.3f" % ( i, inflow, quantity,
> outflow, quantityChange )
>
> quantity += quantityChange
>
>
>
> # Plot on graph
>
> x = np.arange( time )
> y = np.arange( quantityChange )
>
> plt.plot( x, y, label="rate of change" )
> plt.ylabel( "Quantity" )
> plt.xlabel( "Time" )
> plt.show()
>
>
> [/code]
>
> I have picked up that neither a 'list' or an 'int' are iterable
> objects,
> but I am stymied by how I can successfully get the x and y axes to
> portray the data outputs.
>
> Also, what does that error message mean? That the starting point
> must
> be 0 or of the same object type? I haven't found a clear answer
> in the
> tutorial pages yet, but I will perservere.
>
> TIA
>
> AG
>
>
>
> x and y must be in the same length otherwise you hit that error message.
>
> try simply to see the failure:
>
> plt.plot([1,2], [1,2,3])
>
> Use len(x) or x.shape to see how many elements in the array and adjust 
> your code to make x and y has the same length before plotting.
>
>
> -- 
> Gökhan
That was very helpful, thank you Gökhan. Having played around with it a 
bit, I think I've got it fixed.
Thanks.
AG
From: Gökhan S. <gok...@gm...> - 2010年03月21日 19:04:38
On Sun, Mar 21, 2010 at 1:57 PM, AG <com...@go...>wrote:
> Hi List
>
> I cannot figure out how to satisfy this issue to resolve the ValueError:
> x and y must have same first dimension.
>
>
> This is the relevant code:
> [code]
>
> for i in range( 0, time + 1 ):
>
> outflow = constant * quantity
>
> quantityChange = inflow - outflow
>
> changeList.append( quantityChange )
>
> print "%2d %9.2f %11.3f %11.3f %10.3f" % ( i, inflow, quantity,
> outflow, quantityChange )
>
> quantity += quantityChange
>
>
>
> # Plot on graph
>
> x = np.arange( time )
> y = np.arange( quantityChange )
>
> plt.plot( x, y, label="rate of change" )
> plt.ylabel( "Quantity" )
> plt.xlabel( "Time" )
> plt.show()
>
>
> [/code]
>
> I have picked up that neither a 'list' or an 'int' are iterable objects,
> but I am stymied by how I can successfully get the x and y axes to
> portray the data outputs.
>
> Also, what does that error message mean? That the starting point must
> be 0 or of the same object type? I haven't found a clear answer in the
> tutorial pages yet, but I will perservere.
>
> TIA
>
> AG
>
>
>
x and y must be in the same length otherwise you hit that error message.
try simply to see the failure:
plt.plot([1,2], [1,2,3])
Use len(x) or x.shape to see how many elements in the array and adjust your
code to make x and y has the same length before plotting.
-- 
Gökhan
From: Friedrich R. <fri...@gm...> - 2010年03月21日 19:03:50
2010年3月20日 Ciarán Mooney <gen...@go...>:
> I am using PIL because I plan to plug in a Tkinter interface which can
> directly accept PIL image instances.
You can render matplotlib figures to PIL using following code:
figure.set_size_inches(float(shape[0]) / figure.dpi, float(shape[1]) /
figure.dpi)
canvas = matplotlib.backends.backend_agg.FigureCanvasAgg(figure)
canvas.draw()
image_string = canvas.tostring_rgb()
image = Image.fromstring("RGB", shape, image_string)
fwiw,
Friedrich
From: AG <com...@go...> - 2010年03月21日 18:56:38
Hi List
I cannot figure out how to satisfy this issue to resolve the ValueError: 
x and y must have same first dimension.
This is the relevant code:
[code]
for i in range( 0, time + 1 ):
 outflow = constant * quantity
 quantityChange = inflow - outflow
 changeList.append( quantityChange )
 print "%2d %9.2f %11.3f %11.3f %10.3f" % ( i, inflow, quantity, 
outflow, quantityChange )
 quantity += quantityChange
 
 
# Plot on graph
x = np.arange( time )
y = np.arange( quantityChange )
plt.plot( x, y, label="rate of change" )
plt.ylabel( "Quantity" )
plt.xlabel( "Time" )
plt.show()
[/code]
I have picked up that neither a 'list' or an 'int' are iterable objects, 
but I am stymied by how I can successfully get the x and y axes to 
portray the data outputs.
Also, what does that error message mean? That the starting point must 
be 0 or of the same object type? I haven't found a clear answer in the 
tutorial pages yet, but I will perservere.
TIA
AG
From: Eric F. <ef...@ha...> - 2010年03月21日 18:36:21
Ryan May wrote:
> On Sun, Mar 21, 2010 at 12:23 PM, Martin Bothe <mar...@ba...> wrote:
>> Hey Ryan,
>> thanks for your answer.
>> Ashamed I have to realize that the example works for me as well.
>> When I tried it the first time, I had no pc featuring both internet and a
>> matplotlib installation, so I had to copy everything manually.
>> It seems I skipped a line or whatever.
>> In the gallery, I can't find a multicolored line.
> 
> That's because it wasn't there. :) I've ported it to make better use
> of matplotlib facilities that are now available and added it to SVN.
> In general, however, the gallery is the best place to look because we
> should be keeping it up to date with changes in the code.
> 
> I attached the modified script since it won't show up in the gallery
> right away. I'd take a look, because it drastically simplifies the
> colormapping.
Nice!
Would you also edit the cookbook, please? You could just point to your 
new example; and maybe include a version with a more typical colormap 
and norm, giving a smooth gradation.
Thank you.
Eric
> 
> Ryan
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Ryan M. <rm...@gm...> - 2010年03月21日 17:46:42
Attachments: multicolored_line.py
On Sun, Mar 21, 2010 at 12:23 PM, Martin Bothe <mar...@ba...> wrote:
> Hey Ryan,
> thanks for your answer.
> Ashamed I have to realize that the example works for me as well.
> When I tried it the first time, I had no pc featuring both internet and a
> matplotlib installation, so I had to copy everything manually.
> It seems I skipped a line or whatever.
> In the gallery, I can't find a multicolored line.
That's because it wasn't there. :) I've ported it to make better use
of matplotlib facilities that are now available and added it to SVN.
In general, however, the gallery is the best place to look because we
should be keeping it up to date with changes in the code.
I attached the modified script since it won't show up in the gallery
right away. I'd take a look, because it drastically simplifies the
colormapping.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Martin B. <mar...@ba...> - 2010年03月21日 17:23:43
Hey Ryan,
thanks for your answer.
Ashamed I have to realize that the example works for me as well.
When I tried it the first time, I had no pc featuring both internet and a
matplotlib installation, so I had to copy everything manually.
It seems I skipped a line or whatever.
In the gallery, I can't find a multicolored line.
Thanks again, greetings
Martin
On Sun, Mar 21, 2010 at 5:59 PM, Ryan May <rm...@gm...> wrote:
> On Sun, Mar 21, 2010 at 6:17 AM, Martin Bothe
> <mar...@go...> wrote:
> > Hello matplotlib-community,
> >
> > I'm using matplotlib since a while, but have never had a real reason to
> > write to the mailing-list yet.
> > Furthermore I know, that the Cookbook at scipy.org is more or less
> outdated
> >
> > Anyway, I tried the multicolored Line example at
> > http://www.scipy.org/Cookbook/Matplotlib/MulticoloredLine (at the
> bottom)
> > and found that I get an AssertionError, without further description or
> > exeption string.
> > The line producing the error is this one:
> >
> > 10. LC = LineCollection(segments, colors = colors)
> >
> >
> >
> > How to get rid of this problem?
> > Is there an alternative way?
>
> Can you copy and paste the actual error message and traceback? I run
> the script here on SVN trunk and it works fine.
>
> If you're looking for an update "cookbook", you can always look at the
> gallery:
>
> http://matplotlib.sourceforge.net/gallery.html
>
> Ryan
>
> --
> Ryan May
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma
>
From: Ryan M. <rm...@gm...> - 2010年03月21日 16:59:53
On Sun, Mar 21, 2010 at 6:17 AM, Martin Bothe
<mar...@go...> wrote:
> Hello matplotlib-community,
>
> I'm using matplotlib since a while, but have never had a real reason to
> write to the mailing-list yet.
> Furthermore I know, that the Cookbook at scipy.org is more or less outdated
>
> Anyway, I tried the multicolored Line example at
> http://www.scipy.org/Cookbook/Matplotlib/MulticoloredLine (at the bottom)
> and found that I get an AssertionError, without further description or
> exeption string.
> The line producing the error is this one:
>
> 10. LC = LineCollection(segments, colors = colors)
>
>
>
> How to get rid of this problem?
> Is there an alternative way?
Can you copy and paste the actual error message and traceback? I run
the script here on SVN trunk and it works fine.
If you're looking for an update "cookbook", you can always look at the gallery:
http://matplotlib.sourceforge.net/gallery.html
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Martin B. <mar...@go...> - 2010年03月21日 11:17:36
Hello matplotlib-community,
I'm using matplotlib since a while, but have never had a real reason to
write to the mailing-list yet.
Furthermore I know, that the Cookbook at scipy.org is more or less outdated
Anyway, I tried the multicolored Line example at
http://www.scipy.org/Cookbook/Matplotlib/MulticoloredLine (at the bottom)
and found that I get an AssertionError, without further description or
exeption string.
The line producing the error is this one:
10. LC = LineCollection(segments, colors = colors)
How to get rid of this problem?
Is there an alternative way?
Thanks and greets!
Martin
From: Philippe C. <phi...@gm...> - 2010年03月21日 07:16:29
without the svn version, you can save both files.
edit figureoptions.py to modify the import:
#import matplotlib.backends.qt4_editor.formlayout as formlayout
import formlayout
then, you can attach the nice dialog box to a Event, something like that
works:
import matplotlib.pyplot as plt
import numpy as np
import figureoptions
t = np.arange(0, 1+0.01, 0.01)
y = np.sin(2*np.pi*t)
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(t, y, 'r-o')
def onclick(event):
 figureoptions.figure_edit(ax)
cid = fig.canvas.mpl_connect('button_press_event', onclick)
plt.show()
click on the figure, you will get the dialog box. less cool than the button,
but not too bad.
2010年3月21日 Peter Butterworth <bu...@gm...>
> Correction: '0.99.3rc1' does not include the qt4_editor code, so you
> do need to get the source files from svn.
>
> The feature is a nice addition to matplotlib..
>
>
> On Sun, Mar 21, 2010 at 1:53 AM, Gökhan Sever <gok...@gm...>
> wrote:
> >
> >
> > On Sat, Mar 20, 2010 at 7:43 PM, <bu...@gm...> wrote:
> >>
> >> I'm using the recent '0.99.3rc1' which does include the qt4_editor code.
> >
> >
> > If you have the qt4_editor code within your installation you are good to
> go
> > then. Just create a new plot while the Qt4Agg backend is pre-selected you
> > should have an additional icon on the existing navigation toolbar. From
> > there on you should see a window when you fire that icon.
> >
> > It is migrated from Pierre Raybout's spyderlib
> > (http://code.google.com/p/spyderlib/)
> >
> >
> >>
> >> Should the new toolbar just appear when you open a plot or is specific
> >> code needed to call it ?
> >>
> >>
> >> Le , Gökhan Sever <gok...@gm...> a écrit :
> >> >
> >> >
> >> > On Sat, Mar 20, 2010 at 6:06 PM, butterw bu...@gm...> wrote:
> >> >
> >> >
> >> >
> >> > Is there an minimal example file available showing how to activate
> this
> >> > new
> >> >
> >> > plot toolbar ?
> >> >
> >> >
> >> >
> >> > changing the backend to Qt4Agg apparently is not sufficient.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> > You need to install matplotlib from the svn trunk.
> >> >
> >> > http://matplotlib.sourceforge.net/faq/installing_faq.html#install-svn
> >> >
> >> >
> >> > --
> >> > Gökhan
> >
> >
> > --
> > Gökhan
> >
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Peter B. <bu...@gm...> - 2010年03月21日 03:22:14
Correction: '0.99.3rc1' does not include the qt4_editor code, so you
do need to get the source files from svn.
The feature is a nice addition to matplotlib..
On Sun, Mar 21, 2010 at 1:53 AM, Gökhan Sever <gok...@gm...> wrote:
>
>
> On Sat, Mar 20, 2010 at 7:43 PM, <bu...@gm...> wrote:
>>
>> I'm using the recent '0.99.3rc1' which does include the qt4_editor code.
>
>
> If you have the qt4_editor code within your installation you are good to go
> then. Just create a new plot while the Qt4Agg backend is pre-selected you
> should have an additional icon on the existing navigation toolbar. From
> there on you should see a window when you fire that icon.
>
> It is migrated from Pierre Raybout's spyderlib
> (http://code.google.com/p/spyderlib/)
>
>
>>
>> Should the new toolbar just appear when you open a plot or is specific
>> code needed to call it ?
>>
>>
>> Le , Gökhan Sever <gok...@gm...> a écrit :
>> >
>> >
>> > On Sat, Mar 20, 2010 at 6:06 PM, butterw bu...@gm...> wrote:
>> >
>> >
>> >
>> > Is there an minimal example file available showing how to activate this
>> > new
>> >
>> > plot toolbar ?
>> >
>> >
>> >
>> > changing the backend to Qt4Agg apparently is not sufficient.
>> >
>> >
>> >
>> >
>> >
>> > You need to install matplotlib from the svn trunk.
>> >
>> > http://matplotlib.sourceforge.net/faq/installing_faq.html#install-svn
>> >
>> >
>> > --
>> > Gökhan
>
>
> --
> Gökhan
>
From: Gökhan S. <gok...@gm...> - 2010年03月21日 00:53:14
On Sat, Mar 20, 2010 at 7:43 PM, <bu...@gm...> wrote:
> I'm using the recent '0.99.3rc1' which does include the qt4_editor code.
>
If you have the qt4_editor code within your installation you are good to go
then. Just create a new plot while the Qt4Agg backend is pre-selected you
should have an additional icon on the existing navigation toolbar. From
there on you should see a window when you fire that icon.
It is migrated from Pierre Raybout's spyderlib (
http://code.google.com/p/spyderlib/)
>
> Should the new toolbar just appear when you open a plot or is specific code
> needed to call it ?
>
>
> Le , Gökhan Sever <gok...@gm...> a écrit :
>
> >
> >
> > On Sat, Mar 20, 2010 at 6:06 PM, butterw bu...@gm...> wrote:
> >
> >
> >
> > Is there an minimal example file available showing how to activate this
> new
> >
> > plot toolbar ?
> >
> >
> >
> > changing the backend to Qt4Agg apparently is not sufficient.
> >
> >
> >
> >
> >
> > You need to install matplotlib from the svn trunk.
> >
> > http://matplotlib.sourceforge.net/faq/installing_faq.html#install-svn
> >
> >
> > --
> > Gökhan
>
-- 
Gökhan
From: <bu...@gm...> - 2010年03月21日 00:43:50
I'm using the recent '0.99.3rc1' which does include the qt4_editor code.
Should the new toolbar just appear when you open a plot or is specific code 
needed to call it ?
Le , Gökhan Sever <gok...@gm...> a écrit :
> On Sat, Mar 20, 2010 at 6:06 PM, butterw bu...@gm...> wrote:
> Is there an minimal example file available showing how to activate this 
> new
> plot toolbar ?
> changing the backend to Qt4Agg apparently is not sufficient.
> You need to install matplotlib from the svn trunk.
> http://matplotlib.sourceforge.net/faq/installing_faq.html#install-svn
> --
> Gökhan
From: Gökhan S. <gok...@gm...> - 2010年03月20日 23:17:57
On Sat, Mar 20, 2010 at 6:06 PM, butterw <bu...@gm...> wrote:
>
> Is there an minimal example file available showing how to activate this new
> plot toolbar ?
>
> changing the backend to Qt4Agg apparently is not sufficient.
>
>
You need to install matplotlib from the svn trunk.
http://matplotlib.sourceforge.net/faq/installing_faq.html#install-svn
-- 
Gökhan
From: butterw <bu...@gm...> - 2010年03月20日 23:06:44
Is there an minimal example file available showing how to activate this new
plot toolbar ?
changing the backend to Qt4Agg apparently is not sufficient.
Gökhan SEVER-2 wrote:
> 
> Hi Pierre Raybaut a nice extension for what you are asking. You will need
> to
> use Qt4Agg backend to use it. The code is at
> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/backends/qt4_editor/
> 
> He doesn't seem like planning to add more onto this extension (
> http://code.google.com/p/spyderlib/issues/detail?id=136)
> 
> This said, his code is easy to read and you should easily be able to
> extend
> it according to your need.
> 
> 
> -- 
> Gökhan
> 
-- 
View this message in context: http://old.nabble.com/toolbar-tp27944614p27972619.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Ciarán M. <gen...@go...> - 2010年03月20日 22:23:11
Hi,
> I haven't tried it, but maybe it's to do with the fact that you're
> quantising the colourmap to 256 values; I think matplotlib computes the
> exact rgb values using interpolation. If the only reason you're using
> PIL is to get a .bmp file, maybe you could save the file straight from
> matplotlib as a .png then externally convert it to a .bmp
I thought so until I put in cm.jet[255] and it maxed out. The
granularity of the 255 colours that I get from exporting the RGB
values is more than enough for the ranges of data I use. So I am happy
with that.
I am using PIL because I plan to plug in a Tkinter interface which can
directly accept PIL image instances.
Ciarán
From: Gary J. <gf...@gm...> - 2010年03月20日 18:34:19
Hi all --
I'm new to Matplotlib, and it looks like a great project, but I'm having
trouble figuring out one thing.
I would like to draw a pie chart, but have each wedge appear to have
thickness. I see from the examples and the docs that it is possible to draw
a wedge in relief so that it appears to cast a shadow, but I don't see how
to make it look something like this. Pardon my bad ascii art. :)
 ___________________
 | \ /
 \ \ /
 \ \ /
 \ \ /
 \ \ /
 \ \ /
 \ \ /
 \ \ /
 \ \/
 \|
Is there a way to do this?
Thanks,
Gary
From: Vincent D. <vi...@vi...> - 2010年03月20日 04:32:51
I am running the 6.01 enthought 64 python package.
I do the development inside of wingide
if I run code inside of the wingide pythonshell, do a simple plot, I have to
type show().
If I try to save the plot, I get the dialog but can not enter text into the
file name. I can select an existing file and it will load the name into the
text box but I can not edit it. Another strange part about this is that if I
select an existing image.jpg and then hit save. I does not over write this
file since it defaults to a png file. The plot gets saved as a image.png.
Not sure it this is the right forum to post this, guidance or help would be
appreciated.
 *Vincent Davis
720-301-3003 *
vi...@vi...
 my blog <http://vincentdavis.net> |
LinkedIn<http://www.linkedin.com/in/vincentdavis>
From: Michael D. <md...@st...> - 2010年03月19日 19:15:17
I have no experience with cx_freeze, but the page on packaging 
matplotlib with py2exe may be relevant. You do need to find a way to 
convince cx_freeze to include the data files and then a way for 
matplotlib to find them at run time.
Mike
Peter Bloomfield wrote:
> Hi,
>
> I want to build executables from python scripts that call matplotlib under linux. To this end I have installed cxfreeze on my 
> SuSE 11.2 machine
>
> I have tried two methods
> 	1. Execute the command 'cxfreeze script.py'
> and
> 	2. Creating a setup.py script
> 		import cx_Freeze
> 		import sys
> 		base = None
> 		if sys.platform == "win32":
> 		 base = "Win32GUI"
>
> 		executables = [
> 		 cx_Freeze.Executable("script.py", base = base)
> 		]
> 		cx_Freeze.setup(
> 		 name = "script",
> 		 version = "0.1",
> 		 description = "Sample matplotlib script",
> 		 executables = executables)
> 	and then execute 'python setup.py build'
>
> In both cases I get an executable, but when executed I get the following error
> 	RuntimeError: Could not find the matplotlib data files
>
> The version of matplotlib I am running is 0.99.1.1 and Python 2.6.2
>
> Does anyone have any thoughts/suggestions to resolve this, thanks
>
>
> Peter
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Peter B. <pet...@ca...> - 2010年03月19日 19:12:00
Hi,
I want to build executables from python scripts that call matplotlib under linux. To this end I have installed cxfreeze on my 
SuSE 11.2 machine
I have tried two methods
	1. Execute the command 'cxfreeze script.py'
and
	2. Creating a setup.py script
		import cx_Freeze
		import sys
		base = None
		if sys.platform == "win32":
		 base = "Win32GUI"
		executables = [
		 cx_Freeze.Executable("script.py", base = base)
		]
		cx_Freeze.setup(
		 name = "script",
		 version = "0.1",
		 description = "Sample matplotlib script",
		 executables = executables)
	and then execute 'python setup.py build'
In both cases I get an executable, but when executed I get the following error
	RuntimeError: Could not find the matplotlib data files
The version of matplotlib I am running is 0.99.1.1 and Python 2.6.2
Does anyone have any thoughts/suggestions to resolve this, thanks
Peter
From: David <ld...@gm...> - 2010年03月19日 18:05:02
Attachments: dea.ps dea.py
Hello Mike, dear list,
I am now able to generate a ps (and png) file with CJK characters (eps 
does NOT work).
But my paths was rather surprising:
* I put SimHei back at first position in matplotlibrc:
	font.sans-serif: SimHei, ~
* the following I took out of my dea.py:
	#import matplotlib
	#matplotlib.use('GtkCairo')
* also, I have taken out:
	#rcParams['font.sans-serif'] = ['Adobe Song Std']
	#rcParams['font.sans-serif'] = ['SimHei']
Note here that when I take the 'Adobe Song' line out, no CJK gets 
produced. The 'SimHei' line makes no difference.
I can confirm that:
In [9]: matplotlib.get_backend()
Out[9]: 'GTKCairo'
And: no eps gets generated.
Basically I therefore followed the instructions here [Chinese]:
http://hi.baidu.com/lijiangshui/blog/item/a0aad703cd65ee7e3812bb49.html
While eps generation continues not to work, my system is now, via 
ps2eps, productive.
Thanks for all your help, Mike!
David
From: Reinier H. <re...@he...> - 2010年03月19日 17:28:23
Hi Armin,
Thanks, I added it to the mplot3d examples.
Cheers,
Reinier
On Thu, Mar 18, 2010 at 3:46 PM, Armin Moser
<arm...@st...> wrote:
> Hi,
>
> you can create your supporting points on a regular r, phi grid and
> transform them then to cartesian coordinates:
>
> from mpl_toolkits.mplot3d import Axes3D
> import matplotlib
> import numpy as np
> from matplotlib import cm
> from matplotlib import pyplot as plt
> step = 0.04
> maxval = 1.0
> fig = plt.figure()
> ax = Axes3D(fig)
>
> # create supporting points in polar coordinates
> r = np.linspace(0,1.25,50)
> p = np.linspace(0,2*np.pi,50)
> R,P = np.meshgrid(r,p)
> # transform them to cartesian system
> X,Y = R*np.cos(P),R*np.sin(P)
>
> Z = ((R**2 - 1)**2)
> ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet)
> ax.set_zlim3d(0, 1)
> ax.set_xlabel(r'$\phi_\mathrm{real}$')
> ax.set_ylabel(r'$\phi_\mathrm{im}$')
> ax.set_zlabel(r'$V(\phi)$')
> ax.set_xticks([])
> plt.show()
>
> hth
> Armin
>
>
> klukas schrieb:
>> I'm guessing this is currently impossible with the current mplot3d
>> functionality, but I was wondering if there was any way I could generate a
>> 3d graph with r, phi, z coordinates rather than x, y, z?
>>
>> The point is that I want to make a figure that looks like the following:
>> http://upload.wikimedia.org/wikipedia/commons/7/7b/Mexican_hat_potential_polar.svg
>>
>> Using the x, y, z system, I end up with something that has long tails like
>> this:
>> http://upload.wikimedia.org/wikipedia/commons/4/44/Mecanismo_de_Higgs_PH.png
>>
>> If I try to artificially cut off the data beyond some radius, I end up with
>> jagged edges that are not at all visually appealing.
>>
>> I would appreciate any crazy ideas you can come up with.
>>
>> Thanks,
>> Jeff
>>
>> P.S. Code to produce the ugly jaggedness is included below:
>>
>> -------------------------------------------------------
>> from mpl_toolkits.mplot3d import Axes3D
>> import matplotlib
>> import numpy as np
>> from matplotlib import cm
>> from matplotlib import pyplot as plt
>>
>> step = 0.04
>> maxval = 1.0
>> fig = plt.figure()
>> ax = Axes3D(fig)
>> X = np.arange(-maxval, maxval, step)
>> Y = np.arange(-maxval, maxval, step)
>> X, Y = np.meshgrid(X, Y)
>> R = np.sqrt(X**2 + Y**2)
>> Z = ((R**2 - 1)**2) * (R < 1.25)
>> ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet)
>> ax.set_zlim3d(0, 1)
>> #plt.setp(ax.get_xticklabels(), visible=False)
>> ax.set_xlabel(r'$\phi_\mathrm{real}$')
>> ax.set_ylabel(r'$\phi_\mathrm{im}$')
>> ax.set_zlabel(r'$V(\phi)$')
>> ax.set_xticks([])
>> plt.show()
>>
>
>
> --
> Armin Moser
> Institute of Solid State Physics
> Graz University of Technology
> Petersgasse 16
> 8010 Graz
> Austria
> Tel.: 0043 316 873 8477
>
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-- 
Reinier Heeres
Tel: +31 6 10852639
From: Gary R. <gr...@bi...> - 2010年03月19日 12:55:02
I haven't tried it, but maybe it's to do with the fact that you're 
quantising the colourmap to 256 values; I think matplotlib computes the 
exact rgb values using interpolation. If the only reason you're using 
PIL is to get a .bmp file, maybe you could save the file straight from 
matplotlib as a .png then externally convert it to a .bmp
Gary R.
Ciarán Mooney wrote:
> Hi,
> 
> I am trying to create an image from an array using PIL, numpy and a
> colourmap from matplotlib.
<snip>
> I'd like to get something that looks the same. I don't think the
> problems are because of the colourmap but rather because of my log
> scaling. Could someone please explain how matplotlib scales the image
> to make it look so nice?
> 
> Regards,
> 
> Ciarán
27 messages has been excluded from this view by a project administrator.

Showing results of 492

<< < 1 .. 6 7 8 9 10 .. 20 > >> (Page 8 of 20)
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 によって変換されたページ (->オリジナル) /