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






Showing results of 346

<< < 1 .. 6 7 8 9 10 .. 14 > >> (Page 8 of 14)
From: Kurt F. <kur...@ho...> - 2010年01月19日 07:48:35
JJ thanks for the tip unfortunately there was no change.
I modified the script for the hax. annotate(...) to include the annotate_clip=False, however there is no change in the behaviour of the arrows. They are not visible until the xy=(a,b) have values for "a" and "b" that are both greater than their respective origin values (0,0), otherwise they remain clipped. I tested this by replacing the "true" value with (1.0e-10,1.0e-10) resulting in the arrow becoming visible. This is a feasible work around for this instance but it may not suit all applications. 
Is anybody else experiencing the same issue? Is there another setting that I my tweak to overcome this?
Kind Regards,
Kurt
> From: lee...@gm...
> Date: 2010年1月18日 19:18:31 -0500
> Subject: Re: [Matplotlib-users] Annotate Behaviour - Arrows Missing
> To: kur...@ho...
> CC: mat...@li...
> 
> This is the feature that is not properly documented.
> You should call annotate with optional keyword
> 
> annotation_clip=False,
> 
> See below for the details.
> 
> http://matplotlib.sourceforge.net/api/artist_api.html?highlight=annotation#matplotlib.text.Annotation.set_annotation_clip
> 
> I'll fix the documentation.
> Regards,
> 
> -JJ
> 
> 
> On Mon, Jan 18, 2010 at 6:19 PM, Kurt Forrester
> <kur...@ho...> wrote:
> > Ubuntu Karmic
> > matplotlib from repository
> > Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
> > [GCC 4.4.1] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> >>>> import matplotlib as mpl
> >>>> mpl.__version__
> > '0.99.0'
> >
> > Running the leach_kinetics.py script and annotating the graph should display
> > two annotations indicating the position of relevant phenomena. However,
> > attached are two outputs, 1) as_script.pdf shows the output of the script
> > (note the missing annotations) and 2) a panned image showing the presence of
> > the annotation when the origin is moved into the visible area of the axes.
> >
> > There seems to be some strange clipping behaviour (not too sure if that is
> > the correct term) with respect the the drawing (or not) of the arrow. It
> > appears that if the arrow begins or ends on the axes then it is not drawn.
> > Verification of this and tips for a matplotlib tweak to prevent it from
> > happening would also be appreciated?
> >
> > Kind Regards,
> >
> > Kurt
> >
> > ________________________________
> > If It Exists, You'll Find it on SEEK Shopping Trolley Mechanic
> > ------------------------------------------------------------------------------
> > Throughout its 18-year history, RSA Conference consistently attracts the
> > world's best and brightest in the field, creating opportunities for
> > Conference
> > attendees to learn about information security's most important issues
> > through
> > interactions with peers, luminaries and emerging and established companies.
> > http://p.sf.net/sfu/rsaconf-dev2dev
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
 		 	 		 
_________________________________________________________________
Video chat with Windows Live Messenger Learn how
http://windowslive.ninemsn.com.au/messenger/article/870686/video-chat-with-messenger 
From: Jae-Joon L. <lee...@gm...> - 2010年01月19日 01:11:56
This is the feature that is not properly documented.
You should call annotate with optional keyword
 annotation_clip=False,
See below for the details.
http://matplotlib.sourceforge.net/api/artist_api.html?highlight=annotation#matplotlib.text.Annotation.set_annotation_clip
I'll fix the documentation.
Regards,
-JJ
On Mon, Jan 18, 2010 at 6:19 PM, Kurt Forrester
<kur...@ho...> wrote:
> Ubuntu Karmic
> matplotlib from repository
> Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
> [GCC 4.4.1] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import matplotlib as mpl
>>>> mpl.__version__
> '0.99.0'
>
> Running the leach_kinetics.py script and annotating the graph should display
> two annotations indicating the position of relevant phenomena. However,
> attached are two outputs, 1) as_script.pdf shows the output of the script
> (note the missing annotations) and 2) a panned image showing the presence of
> the annotation when the origin is moved into the visible area of the axes.
>
> There seems to be some strange clipping behaviour (not too sure if that is
> the correct term) with respect the the drawing (or not) of the arrow. It
> appears that if the arrow begins or ends on the axes then it is not drawn.
> Verification of this and tips for a matplotlib tweak to prevent it from
> happening would also be appreciated?
>
> Kind Regards,
>
> Kurt
>
> ________________________________
> If It Exists, You'll Find it on SEEK Shopping Trolley Mechanic
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for
> Conference
> attendees to learn about information security's most important issues
> through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Kurt F. <kur...@ho...> - 2010年01月18日 23:20:05
Ubuntu Karmic
matplotlib from repository
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) 
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib as mpl
>>> mpl.__version__
'0.99.0'
Running the leach_kinetics.py script and annotating the graph should display two annotations indicating the position of relevant phenomena. However, attached are two outputs, 1) as_script.pdf shows the output of the script (note the missing annotations) and 2) a panned image showing the presence of the annotation when the origin is moved into the visible area of the axes.
There seems to be some strange clipping behaviour (not too sure if that is the correct term) with respect the the drawing (or not) of the arrow. It appears that if the arrow begins or ends on the axes then it is not drawn. Verification of this and tips for a matplotlib tweak to prevent it from happening would also be appreciated?
Kind Regards,
Kurt
 		 	 		 
_________________________________________________________________
Shopping Trolley Mechanic If It Exists, You'll Find it on SEEK
http://clk.atdmt.com/NMN/go/157639755/direct/01/ 
From: Damon M. <D.M...@wa...> - 2010年01月18日 22:16:13
Hi all,
I'm using the PDF backend and I'm mucking around with the figure width and height settings to try and get the label text size equal to that of the tex in a LaTeX report I'm writing. The following code set my dimensions:
FACTOR = 1.0
fig_width_pt = 483.69687 * FACTOR # figure width in pt as returned by \showthe in LaTeX multiplied by a factor
inches_per_pt = 1.0/72.27
golden_ratio = (np.sqrt(5) - 1.0) / 2.0
fig_width_in = fig_width_pt * inches_per_pt
fig_height_in = fig_width_in * golden_ratio
fig_dims = [fig_width_in, fig_height_in]
matplotlib.use('PDF')
matplotlib.rc('font',**{'family':'serif','serif':['Computer Modern Roman']})
matplotlib.rc('text', usetex=True)
matplotlib.rc('axes', labelsize=8)
matplotlib.rc('legend', fontsize=8)
matplotlib.rc('xtick', labelsize=8)
matplotlib.rc('ytick', labelsize=8)
matplotlib.rc('font', size=8)
matplotlib.rc('figure', figsize=fig_dims)
I then plot my data, all is fine until I realised that the saved PDF uses a generous amount of whitespace around the edge of the figure. I get rid of the whitespace by calling savefig with a few extra arguments:
fig2.savefig('errors.pdf', bbox_inches='tight', pad_inches=0.03)
For about 18 months now I've been under the illusion that this produces a figure whose labels are actually size 8 text. This is not the case (after import into LaTeX) since the axing of the whitespace has been done in such a way that the figure does not take up the available space. The figure is actually cropped. So when it's imported into LaTeX the figure is actually blown up (slightly) due to the cropping.
Is there another way around this that will get rid of the whitespace and have the physical figure be 483.69687pt wide?
Any help would be greatly appreciated.
Regards,
-- Damon
--------------------------
Damon McDougall
Mathematics Institute
University of Warwick
Coventry
CV4 7AL
d.m...@wa...
From: Christoph G. <cg...@uc...> - 2010年01月18日 22:04:46
The extension _TKAGG.PYD depends on TK84.DLL, TCL84.DLL, MSVCP71.DLL, 
and MSVCR71.DLL. Make sure all these files are located in the Windows 
search path, e.g. in one of the directories listed in the PATH 
environment variable.
Christoph
On 1/18/2010 1:45 PM, H L wrote:
>
> Thanks. I ran the Simple Hello World program (section 25.1.2.2 at
> http://docs.python.org/library/tkinter.html) without any problem, so I
> guess Tk installation itself is ok.
> Someone has experience with getting matplotlib work with Tk?
>
>
> --- On *Sun, 1/17/10, Erik Tollerud /<eri...@gm...>/* wrote:
>
>
> From: Erik Tollerud <eri...@gm...>
> Subject: Re: [Matplotlib-users] problem with import pylab
> To: "H L" <hu...@ya...>
> Date: Sunday, January 17, 2010, 9:18 PM
>
> Just based on the traceback, the problem seems to be in Tk - does
> anything in tk work for you? (e.g. any of the builtin python gui
> stuff) You might try installing wx and changing your matplotlibrc
> file to have the line "backend:WxAgg" in it. I've never tried using
> the wx backend on windows (anyone done this?), but presumably it
> should work...
>
> On Fri, Jan 15, 2010 at 5:47 PM, H L <hu...@ya...
> <http://us.mc529.mail.yahoo.com/mc/compose?to=hu...@ya...>> wrote:
>
> Hello:
> I am having problem with "import pylab". I attached the
> traceback below. I have googled on the web but haven't found a
> solution. Can someone here help?
> I have ActivePython 2.5, numpy-1.4.0-win32, and
> matplotlib-0.99.1.win32-py2.5.exe, and Windows XP SP3.
> --------------------------------------
> Traceback (most recent call last):
> File "<interactive input>", line 1, in <module>
> File "C:\Python25\lib\site-packages\pylab.py", line 1, in <module>
> from matplotlib.pylab import *
> File "C:\Python25\lib\site-packages\matplotlib\pylab.py", line
> 247, in <module>
> from matplotlib.pyplot import *
> File "C:\Python25\lib\site-packages\matplotlib\pyplot.py", line
> 78, in <module>
> new_figure_manager, draw_if_interactive, show = pylab_setup()
> File
> "C:\Python25\lib\site-packages\matplotlib\backends\__init__.py",
> line 25, in pylab_setup
> globals(),locals(),[backend_name])
> File
> "C:\Python25\lib\site-packages\matplotlib\backends\backend_tkagg.py",
> line 8, in <module>
> import tkagg # Paint image to Tk photo blitter extension
> File
> "C:\Python25\lib\site-packages\matplotlib\backends\tkagg.py",
> line 1, in <module>
> import _tkagg
> ImportError: DLL load failed: The specified module could not be
> found.
> Thanks.
> HL
>
>
>
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently
> attracts the
> world's best and brightest in the field, creating opportunities
> for Conference
> attendees to learn about information security's most important
> issues through
> interactions with peers, luminaries and emerging and established
> companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> <http://us.mc529.mail.yahoo.com/mc/compose?to=Mat...@li...>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
>
>
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for Conference
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: ashleyd <ash...@gm...> - 2010年01月18日 21:46:40
I'm trying to figure out if it's possible to use a table as a legend of
sorts, as I have a very busy graph I'm trying to describe.
Basically:
- I'm visualizing data from a series of similar but not-quite-identical
simulations
- I'd like to have the simulation parameters displayed in a table format,
with an example line from the graph next to each row
So, I might have rows that look like:
"Line", "Alpha", "Beta"...
"-----" , "0.125", "2.0"....
"- - -", "0.120", "2.0"....
The problem is I can't figure out how to include a line "sample" like what's
included with the legend in a table, and I can't figure out how to make
legend entries that don't have any lines. I suspect that I could make a
dummy white plot, and use that for my data entries in a legend and make a
legend-table hybrid that way. However, I think using a table would be
cleaner and look nicer.
Does anyone have any ideas as to how to get this working?
While I'm posting, another quick question -- my text output looks really
shoddy, even at high DPIs. It looks like somebody took a screenshot of a
tiny font and scaled it up with a linear filter. I have freetype installed,
and the matplotlib build script outputs the following, if it's helpful:
BUILDING MATPLOTLIB
 matplotlib: 0.99.1.1
 python: 2.5.4 (r254:67916, Apr 4 2009, 17:56:17) [GCC
 4.3.3]
 platform: linux2
REQUIRED DEPENDENCIES
 numpy: 1.2.1
 freetype2: 9.20.3
OPTIONAL BACKEND DEPENDENCIES
 libpng: 1.2.27
 Tkinter: Tkinter: 67737, Tk: 8.5, Tcl: 8.5
 wxPython: 2.8.9.1
 * WxAgg extension not required for wxPython >= 2.8
 Gtk+: gtk+: 2.16.1, glib: 2.20.1, pygtk: 2.14.1,
 pygobject: 2.16.1
 Mac OS X native: no
 Qt: no
 Qt4: no
 Cairo: 1.4.12
OPTIONAL DATE/TIMEZONE DEPENDENCIES
 datetime: present, version unknown
 dateutil: 1.4.1
 pytz: 2008h
OPTIONAL USETEX DEPENDENCIES
 dvipng: 1.11
 ghostscript: 8.64
 latex: 3.141592
 pdftops: 0.10.5
Thank you in advance for any advice!
-Ashley
-- 
View this message in context: http://old.nabble.com/Using-a-table-as-a-legend%2C-ugly-text-output--tp27206248p27206248.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: H L <hu...@ya...> - 2010年01月18日 21:45:36
Thanks. I ran the Simple Hello World program (section 25.1.2.2 at http://docs.python.org/library/tkinter.html) without any problem, so I guess Tk installation itself is ok.
 
Someone has experience with getting matplotlib work with Tk?
 
 
--- On Sun, 1/17/10, Erik Tollerud <eri...@gm...> wrote:
From: Erik Tollerud <eri...@gm...>
Subject: Re: [Matplotlib-users] problem with import pylab
To: "H L" <hu...@ya...>
Date: Sunday, January 17, 2010, 9:18 PM
Just based on the traceback, the problem seems to be in Tk - does anything in tk work for you? (e.g. any of the builtin python gui stuff) You might try installing wx and changing your matplotlibrc file to have the line "backend:WxAgg" in it. I've never tried using the wx backend on windows (anyone done this?), but presumably it should work...
On Fri, Jan 15, 2010 at 5:47 PM, H L <hu...@ya...> wrote:
Hello:
 
I am having problem with "import pylab". I attached the traceback below. I have googled on the web but haven't found a solution. Can someone here help?
 
I have ActivePython 2.5, numpy-1.4.0-win32, and matplotlib-0.99.1.win32-py2.5.exe, and Windows XP SP3.
--------------------------------------
Traceback (most recent call last):
 File "<interactive input>", line 1, in <module>
 File "C:\Python25\lib\site-packages\pylab.py", line 1, in <module>
  from matplotlib.pylab import *
 File "C:\Python25\lib\site-packages\matplotlib\pylab.py", line 247, in <module>
  from matplotlib.pyplot import *
 File "C:\Python25\lib\site-packages\matplotlib\pyplot.py", line 78, in <module>
  new_figure_manager, draw_if_interactive, show = pylab_setup()
 File "C:\Python25\lib\site-packages\matplotlib\backends\__init__.py", line 25, in pylab_setup
  globals(),locals(),[backend_name])
 File "C:\Python25\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 8, in <module>
  import tkagg         # Paint image to Tk photo blitter extension
 File "C:\Python25\lib\site-packages\matplotlib\backends\tkagg.py", line 1, in <module>
  import _tkagg
ImportError: DLL load failed: The specified module could not be found.
 
Thanks. 
 
HL
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 
From: Jae-Joon L. <lee...@gm...> - 2010年01月18日 21:32:47
http://matplotlib.sourceforge.net/faq/howto_faq.html#automatically-make-room-for-tick-labels
The above example is for ticklabels, but can be easily adopted for axes title.
Regards,
-JJ
On Mon, Jan 18, 2010 at 12:07 PM, Jeremy Lewi <jl...@in...> wrote:
> Hi,
>
>
>
> The title for my axes is being cutoff because the axes is taking up too much
> space. Is there anyway to determine how much space is needed for the title
> so that I can set the axes size to the correct height to prevent the title
> from being cutoff?
>
>
>
> Thanks
>
>
>
> Jeremy Lewi
>
> Engineering Scientist
>
> The Intellisis Corporation
>
> jl...@in...
>
>
>
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for
> Conference
> attendees to learn about information security's most important issues
> through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Erik T. <eri...@gm...> - 2010年01月18日 20:38:55
Is there a way to change the sizes of scatter plot markers for
mplot3d.Axes3D.scatter3d ? I do
from mpl_toolkits.mplot3d import Axes3D
ax = Axes3D(gcf())
x,y,z = randn(3,20)
ax.scatter(x,y,z,s=30*rand(20))
and I expect to see 20 points of a range of sizes from 1 to 30... but
instead I see them all the same size. How can I set the size of the
markers?
From: Jeremy L. <jl...@in...> - 2010年01月18日 17:26:45
Hi,
 
The title for my axes is being cutoff because the axes is taking up too much
space. Is there anyway to determine how much space is needed for the title
so that I can set the axes size to the correct height to prevent the title
from being cutoff?
 
Thanks
 
Jeremy Lewi
Engineering Scientist
The Intellisis Corporation
jl...@in...
 
From: Erik T. <eri...@gm...> - 2010年01月18日 05:19:44
Just based on the traceback, the problem seems to be in Tk - does anything
in tk work for you? (e.g. any of the builtin python gui stuff) You might
try installing wx and changing your matplotlibrc file to have the line
"backend:WxAgg" in it. I've never tried using the wx backend on windows
(anyone done this?), but presumably it should work...
On Fri, Jan 15, 2010 at 5:47 PM, H L <hu...@ya...> wrote:
> Hello:
>
> I am having problem with "import pylab". I attached the traceback below. I
> have googled on the web but haven't found a solution. Can someone here help?
>
> I have ActivePython 2.5, numpy-1.4.0-win32, and
> matplotlib-0.99.1.win32-py2.5.exe, and Windows XP SP3.
> --------------------------------------
> Traceback (most recent call last):
> File "<interactive input>", line 1, in <module>
> File "C:\Python25\lib\site-packages\pylab.py", line 1, in <module>
> from matplotlib.pylab import *
> File "C:\Python25\lib\site-packages\matplotlib\pylab.py", line 247, in
> <module>
> from matplotlib.pyplot import *
> File "C:\Python25\lib\site-packages\matplotlib\pyplot.py", line 78, in
> <module>
> new_figure_manager, draw_if_interactive, show = pylab_setup()
> File "C:\Python25\lib\site-packages\matplotlib\backends\__init__.py",
> line 25, in pylab_setup
> globals(),locals(),[backend_name])
> File
> "C:\Python25\lib\site-packages\matplotlib\backends\backend_tkagg.py", line
> 8, in <module>
> import tkagg # Paint image to Tk photo blitter
> extension
> File "C:\Python25\lib\site-packages\matplotlib\backends\tkagg.py", line
> 1, in <module>
> import _tkagg
> ImportError: DLL load failed: The specified module could not be found.
>
> Thanks.
>
> HL
>
>
>
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for
> Conference
> attendees to learn about information security's most important issues
> through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: AliceMartin <rzu...@tr...> - 2010年01月16日 14:04:28
This is what my graph looks like so far: 
http://old.nabble.com/file/p27189491/2hqfayh.png 
I want to move the z axis from the back right to the front left. How do i do
this?
Here is the relevant section of my code:
def make_plot(xaxis):
 fig = plt.figure()
 ax = Axes3D(fig)
 ax.set_xlim3d(xaxis[0], xaxis[-1])
 ax.set_ylim3d(0, timelength)
 ax.set_zlim3d(0, 1)
 poly = PolyCollection(verts, facecolors='w')
 ax.add_collection3d(poly, zs=zs, zdir='y')
 ax.set_xlabel('Time')
 ax.set_ylabel('Distance')
 ax.set_zlabel('Power')
 plt.show()
-- 
View this message in context: http://old.nabble.com/matplot-3d.-How-do-i-change-the-position-of-the-axis--tp27189491p27189491.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: H L <hu...@ya...> - 2010年01月16日 02:13:57
Hello:
 
I am having problem with "import pylab". I attached the traceback below. I have googled on the web but haven't found a solution. Can someone here help?
 
I have ActivePython 2.5, numpy-1.4.0-win32, and matplotlib-0.99.1.win32-py2.5.exe, and Windows XP SP3.
--------------------------------------
Traceback (most recent call last):
 File "<interactive input>", line 1, in <module>
 File "C:\Python25\lib\site-packages\pylab.py", line 1, in <module>
  from matplotlib.pylab import *
 File "C:\Python25\lib\site-packages\matplotlib\pylab.py", line 247, in <module>
  from matplotlib.pyplot import *
 File "C:\Python25\lib\site-packages\matplotlib\pyplot.py", line 78, in <module>
  new_figure_manager, draw_if_interactive, show = pylab_setup()
 File "C:\Python25\lib\site-packages\matplotlib\backends\__init__.py", line 25, in pylab_setup
  globals(),locals(),[backend_name])
 File "C:\Python25\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 8, in <module>
  import tkagg         # Paint image to Tk photo blitter extension
 File "C:\Python25\lib\site-packages\matplotlib\backends\tkagg.py", line 1, in <module>
  import _tkagg
ImportError: DLL load failed: The specified module could not be found.
 
Thanks. 
 
HL
 
From: Wayne W. <sie...@sb...> - 2010年01月15日 23:15:31
I've used MPL a bit, and am wondering if there's a facility for sending 
graphic images to a printer, or putting them in some format like png? 
I don't necessarily want the graphics to appear in a window, but would 
like to print them directly once they are ready. Can one put in a page 
feed, so that images don't all fall on the same page or cut across pages?
Is there any image processing operation available to do simple 
operations like dark subtract or stack different images on one other to 
produce composites of several images? Maybe Python has such a facility 
that's already available as a library?
-- 
 Wayne Watson (Watson Adventures, Prop., Nevada City, CA)
 (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
 Obz Site: 39° 15' 7" N, 121° 2' 32" W, 2700 feet 
 
 "I was thinking about how people seem to read the Bible
 a whole lot more as they get older; then it dawned on 
 me . . they're cramming for their final exam."
 -- George Carlin
 
 Web Page: <www.speckledwithstars.net/>
From: Jae-Joon L. <lee...@gm...> - 2010年01月15日 19:50:34
Colorbar axes is a rather special and things need to be set during the
initialization.
Here is a slightly modified version of your script.
While it does not produces error, I'm not sure if the result is correct.
-JJ
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.dates import DateFormatter,DayLocator
from matplotlib import cm
data = np.arange(24.)+700000.
x = np.random.rand(24)
y = np.random.rand(24)
fig = plt.figure()
ax = fig.add_subplot(111)
smap = ax.scatter(x,y,s=10,c=data,edgecolors='none',marker='o',cmap=cm.jet)
cb = fig.colorbar(smap,orientation='horizontal',shrink=0.7,
 ticks=DayLocator(interval=5),
 format=DateFormatter('%b %d'))
plt.show()
On Thu, Jan 14, 2010 at 3:04 PM, George Nurser <gn...@go...> wrote:
> Hi,
> I've got data in terms of day numbers, and wish to plot it as a 2D
> scatter plot, with the color denoting the day.
>
> I'd like the colorbar to be annotated in Apr 7 type format...
>
> I've tried the following code without success.
>
> import numpy as np
> import matplotlib.pyplot as plt
> from matplotlib.dates import DateFormatter,DayLocator
> from matplotlib import cm
>
> data = np.arange(24.)+700000.
> x = np.random.rand(24)
> y = np.random.rand(24)
> fig = plt.figure()
> ax = fig.add_subplot(111)
> smap = ax.scatter(x,y,s=10,c=data,edgecolors='none',marker='o',cmap=cm.jet)
> cb = fig.colorbar(smap,orientation='horizontal',shrink=0.7)
> cax=cb.ax
> cax.xaxis_date()
> cax.xaxis.set_major_locator(DayLocator())
> cax.xaxis.set_major_formatter(DateFormatter('%b %d'))
> plt.show()
>
> Any ideas on how to do this would be appreciated.
>
> George Nurser.
>
> The code fails with the trace
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/backend_wx.pyc
> in _onPaint(self, evt)
>  1154     drawDC = wx.PaintDC(self)
>  1155     if not self._isDrawn:
> -> 1156       self.draw(drawDC=drawDC)
>  1157     else:
>  1158       self.gui_repaint(drawDC=drawDC)
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/backend_wxagg.pyc
> in draw(self, drawDC)
>   57     """
>   58     DEBUG_MSG("draw()", 1, self)
> ---> 59     FigureCanvasAgg.draw(self)
>   60
>   61     self.bitmap =
> _convert_agg_to_wx_bitmap(self.get_renderer(), None)
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/backend_agg.pyc
> in draw(self)
>  386
>  387     self.renderer = self.get_renderer()
> --> 388     self.figure.draw(self.renderer)
>  389
>  390   def get_renderer(self):
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/artist.pyc
> in draw_wrapper(artist, renderer, *kl)
>   53   def draw_wrapper(artist, renderer, *kl):
>   54     before(artist, renderer)
> ---> 55     draw(artist, renderer, *kl)
>   56     after(artist, renderer)
>   57
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/figure.pyc
> in draw(self, renderer)
>  770
>  771     # render the axes
> --> 772     for a in self.axes: a.draw(renderer)
>  773
>  774     # render the figure text
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/artist.pyc
> in draw_wrapper(artist, renderer, *kl)
>   53   def draw_wrapper(artist, renderer, *kl):
>   54     before(artist, renderer)
> ---> 55     draw(artist, renderer, *kl)
>   56     after(artist, renderer)
>   57
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axes.pyc
> in draw(self, renderer, inframe)
>  1759
>  1760     for zorder, i, a in dsu:
> -> 1761       a.draw(renderer)
>  1762
>  1763     renderer.close_group('axes')
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/artist.pyc
> in draw_wrapper(artist, renderer, *kl)
>   53   def draw_wrapper(artist, renderer, *kl):
>   54     before(artist, renderer)
> ---> 55     draw(artist, renderer, *kl)
>   56     after(artist, renderer)
>   57
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axis.pyc
> in draw(self, renderer, *args, **kwargs)
>  747     renderer.open_group(__name__)
>  748     interval = self.get_view_interval()
> --> 749     for tick, loc, label in self.iter_ticks():
>  750       if tick is None: continue
>  751       if not mtransforms.interval_contains(interval,
> loc): continue
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axis.pyc
> in iter_ticks(self)
>  688     Iterate through all of the major and minor ticks.
>  689     """
> --> 690     majorLocs = self.major.locator()
>  691     majorTicks = self.get_major_ticks(len(majorLocs))
>  692     self.major.formatter.set_locs(majorLocs)
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/dates.pyc
> in __call__(self)
>  530     self.rule.set(dtstart=start, until=stop)
>  531     dates = self.rule.between(dmin, dmax, True)
> --> 532     return self.raise_if_exceeds(date2num(dates))
>  533
>  534   def _get_unit(self):
>
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/ticker.pyc
> in raise_if_exceeds(self, locs)
>  680     'raise a RuntimeError if Locator attempts to create
> more than MAXTICKS locs'
>  681     if len(locs)>=self.MAXTICKS:
> --> 682      raise RuntimeError('Locator attempting to generate
> %d ticks from %s to %s: exceeds Locator.MAXTICKS'%(len(locs), locs[0],
> locs[-1]))
>  683
>  684     return locs
>
> RuntimeError: Locator attempting to generate 3654 ticks from 730120.0
> to 733773.0: exceeds Locator.MAXTICKS
>
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for Conference
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Ryan M. <rm...@gm...> - 2010年01月15日 19:47:19
On Fri, Jan 15, 2010 at 12:19 PM, Paweł Rumian <go...@gm...> wrote:
> 2010年1月15日 Michael Droettboom <md...@st...>:
>> Can you try building matplotlib 0.99.1.1 from the tarball, rather than the
>> gentoo package? That would help to rule out any of the gentoo-specific
>> changes. Nothing in the portage leaps out at me as problematic, but we
>> should rule that out.
>
> I was trying to avoid this, because I didn't want to mess up with my
> python install, and using system and non-system packages
> simultaneously...
>
> But I've just finished building from the tarball available at SF and
> now it works flawlessly. So it is certainly a Gentoo bug.
I can't replicate here on either of my AMD64 Gentoo system (with
Gentoo's 0.99.1.1 matplotlib package). I should note that one is up
to date with Portage (synced Monday) and the other is about 6 weeks
out of date.
With both, I see all 3 lines, correctly masked, unless I'm supposed to
be looking for something else....?
While it might be a Gentoo bug, I don't think it's necessarily in the
matplotlib package, but rather in the underlying dependencies.
Anybody have any clue what to look at from here? Have you tried
blowing away the Gentoo install of matplotlib completely and trying a
new one?
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
From: Paweł R. <go...@gm...> - 2010年01月15日 18:19:14
2010年1月15日 Michael Droettboom <md...@st...>:
> Can you try building matplotlib 0.99.1.1 from the tarball, rather than the
> gentoo package? That would help to rule out any of the gentoo-specific
> changes. Nothing in the portage leaps out at me as problematic, but we
> should rule that out.
I was trying to avoid this, because I didn't want to mess up with my
python install, and using system and non-system packages
simultaneously...
But I've just finished building from the tarball available at SF and
now it works flawlessly. So it is certainly a Gentoo bug.
Thanks!
Paweł
From: Andrew S. <str...@as...> - 2010年01月15日 17:58:29
I just tested 0.99.1.2 (no 0.99.1.1 tarball seems available on SF) and
svn trunk and found no trouble with either on Ubuntu Karmic amd64.
-Andrew
From: Jae-Joon L. <lee...@gm...> - 2010年01月15日 17:55:57
The svn version has a new keyword "bbox_extra_artists", which could be used.
But, there is no easy way for the released version of matplotlib.
Below is a workaround you may use, but it's a bit complicated.
Regards,
-JJ
fig = figure(1)
ax = fig.add_subplot(111)
l1, = ax.plot([1,2,3])
leg = figlegend([l1], ["test"], 1)
def get_tightbbox(renderer):
 from matplotlib.transforms import Bbox, TransformedBbox, Affine2D
 bb = []
 # add fig legend
 bb.append(leg.legendPatch.get_window_extent())
 for ax in fig.axes:
 if ax.get_visible():
 bb.append(ax.get_tightbbox(renderer))
 _bbox = Bbox.union([b for b in bb if b.width!=0 or b.height!=0])
 bbox_inches = TransformedBbox(_bbox,
 Affine2D().scale(1./fig.dpi))
 return bbox_inches
fig.get_tightbbox = get_tightbbox
From: Michael D. <md...@st...> - 2010年01月15日 17:35:20
Can you try building matplotlib 0.99.1.1 from the tarball, rather than 
the gentoo package? That would help to rule out any of the 
gentoo-specific changes. Nothing in the portage leaps out at me as 
problematic, but we should rule that out.
Mike
Paweł Rumian wrote:
> 2010年1月15日 Michael Droettboom <md...@st...>:
> 
>>> Hi Paweł, to repeat a point that may have been lost in Michael's first
>>> email, some code that produces the problem will be greatly useful in
>>> tracking down what's going on.
>>> 
>> If I gather correctly, the masked_demo.py example in the matplotlib source
>> is sufficient to reproduce the bug.
>> 
>
> Yes, exactly.
>
> 
>> Unfortunately, I can't reproduce it
>> here with 0.99.1.1 or SVN HEAD, so there's some environmental difference
>> about Pawel's system -- of course I'm at a loss as to what it might be.
>> 
>
> I suppose it may be somehow Gentoo-related problem - unfortunately I
> only have Gentoo boxes here, so I cannot check another OS, but the
> same problem occurs on a second machine.
> Furthermore I asked a friend with a Gentoo system and he confirmed
> this behaviour, so in the meantime I filed a Gentoo bug:
> http://bugs.gentoo.org/show_bug.cgi?id=301062
>
> Maybe anyone here is also using Gentoo and can check it?
>
> 
>> Are you sure you're running 0.99.1.1?
>> 
>
> Yes, 0.99.1.1 with Python 2.6.4
>
> ~ $ python
> Python 2.6.4 (r264:75706, Dec 9 2009, 12:06:21)
> [GCC 4.3.4] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> 
>>>> import matplotlib
>>>> matplotlib.__version__
>>>> 
> '0.99.1.1'
>
> greetings,
> Paweł
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Paweł R. <go...@gm...> - 2010年01月15日 17:08:14
2010年1月15日 Michael Droettboom <md...@st...>:
>> Hi Paweł, to repeat a point that may have been lost in Michael's first
>> email, some code that produces the problem will be greatly useful in
>> tracking down what's going on.
> If I gather correctly, the masked_demo.py example in the matplotlib source
> is sufficient to reproduce the bug.
Yes, exactly.
> Unfortunately, I can't reproduce it
> here with 0.99.1.1 or SVN HEAD, so there's some environmental difference
> about Pawel's system -- of course I'm at a loss as to what it might be.
I suppose it may be somehow Gentoo-related problem - unfortunately I
only have Gentoo boxes here, so I cannot check another OS, but the
same problem occurs on a second machine.
Furthermore I asked a friend with a Gentoo system and he confirmed
this behaviour, so in the meantime I filed a Gentoo bug:
http://bugs.gentoo.org/show_bug.cgi?id=301062
Maybe anyone here is also using Gentoo and can check it?
> Are you sure you're running 0.99.1.1?
Yes, 0.99.1.1 with Python 2.6.4
~ $ python
Python 2.6.4 (r264:75706, Dec 9 2009, 12:06:21)
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> matplotlib.__version__
'0.99.1.1'
greetings,
Paweł
From: Mario M. <me...@me...> - 2010年01月15日 17:08:03
Hi all,
how can I reduce the white area around the plots (several subplots) with legends outside to the right of the axes when saving it to a png-file?
pyplot.savefig('test2.png',bbox_inches='tight') shrinks the paper to axes size but cuts the legend.
Thanks in advance
Mario Mech
-- 
Dr. Mario Mech
Institute for Geophysics and Meteorology
University of Cologne
Zuelpicher Str. 49a
50674 Cologne
Germany
t: +49 (0)221 - 470 - 1776
f: +49 (0)221 - 470 - 5198
e: me...@me...
w: http://www.meteo.uni-koeln.de/~mmech/
From: Michael D. <md...@st...> - 2010年01月15日 16:52:26
Andrew Straw wrote:
> Paweł Rumian wrote:
> 
>> 2010年1月14日 Michael Droettboom <md...@st...>:
>> 
>> 
>>> What backend are you using? Agg, Cairo and Wx all check out for me. The
>>> examples you point to don't look like Agg output to me...
>>> 
>>> 
>> The examples were produced using savefig and PNG, but I've tried GTK
>> and Qt with Agg and Cairo - neither of them works.
>>
>> 
>> 
>>> Do you have anything in your matplotlibrc?
>>> 
>>> 
>> Nothing but the backend...
>>
>> I've just noticed that the green line shows sometimes when moving the plot.
>> Quick examples:
>> no move: http://img524.imageshack.us/img524/5696/61571712.png
>> slightly right (no change): http://img94.imageshack.us/img94/6722/44916983.png
>> more (green line appears): http://img27.imageshack.us/img27/522/91772530.png
>> even more (disappears behind the edge):
>> http://img246.imageshack.us/img246/9726/24229795.png
>> to the right (another part suddenly appears):
>> http://img190.imageshack.us/img190/5697/69412483.png
>>
>> still no idea...
>> 
>> 
> Hi Paweł, to repeat a point that may have been lost in Michael's first
> email, some code that produces the problem will be greatly useful in
> tracking down what's going on.
> 
If I gather correctly, the masked_demo.py example in the matplotlib 
source is sufficient to reproduce the bug. Unfortunately, I can't 
reproduce it here with 0.99.1.1 or SVN HEAD, so there's some 
environmental difference about Pawel's system -- of course I'm at a loss 
as to what it might be.
Are you sure you're running 0.99.1.1? Earlier versions have exhibited 
this class of bug, but I thought they were all squashed by now. What 
does the following give for you?
 > python
Python 2.5.2 (r252:60911, May 7 2008, 12:40:32)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import matplotlib
 >>> matplotlib.__version__
'0.99.1.1'
Cheers,
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Andrew S. <str...@as...> - 2010年01月15日 16:44:07
Paweł Rumian wrote:
> 2010年1月14日 Michael Droettboom <md...@st...>:
> 
>> What backend are you using? Agg, Cairo and Wx all check out for me. The
>> examples you point to don't look like Agg output to me...
>> 
>
> The examples were produced using savefig and PNG, but I've tried GTK
> and Qt with Agg and Cairo - neither of them works.
>
> 
>> Do you have anything in your matplotlibrc?
>> 
>
> Nothing but the backend...
>
> I've just noticed that the green line shows sometimes when moving the plot.
> Quick examples:
> no move: http://img524.imageshack.us/img524/5696/61571712.png
> slightly right (no change): http://img94.imageshack.us/img94/6722/44916983.png
> more (green line appears): http://img27.imageshack.us/img27/522/91772530.png
> even more (disappears behind the edge):
> http://img246.imageshack.us/img246/9726/24229795.png
> to the right (another part suddenly appears):
> http://img190.imageshack.us/img190/5697/69412483.png
>
> still no idea...
> 
Hi Paweł, to repeat a point that may have been lost in Michael's first
email, some code that produces the problem will be greatly useful in
tracking down what's going on.
-Andrew
From: Paweł R. <go...@gm...> - 2010年01月15日 08:16:04
2010年1月14日 Michael Droettboom <md...@st...>:
> What backend are you using? Agg, Cairo and Wx all check out for me. The
> examples you point to don't look like Agg output to me...
The examples were produced using savefig and PNG, but I've tried GTK
and Qt with Agg and Cairo - neither of them works.
> Do you have anything in your matplotlibrc?
Nothing but the backend...
I've just noticed that the green line shows sometimes when moving the plot.
Quick examples:
no move: http://img524.imageshack.us/img524/5696/61571712.png
slightly right (no change): http://img94.imageshack.us/img94/6722/44916983.png
more (green line appears): http://img27.imageshack.us/img27/522/91772530.png
even more (disappears behind the edge):
http://img246.imageshack.us/img246/9726/24229795.png
to the right (another part suddenly appears):
http://img190.imageshack.us/img190/5697/69412483.png
still no idea...
25 messages has been excluded from this view by a project administrator.

Showing results of 346

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