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




Showing 7 results of 7

From: John H. <jdh...@ac...> - 2004年11月26日 17:05:27
>>>>> "Jouni" =3D=3D Jouni K Sepp=E4nen <jk...@ik...> writes:
 Jouni> Hi, One thing that I really like about Matlab's handle
 Jouni> graphics system is that it is self-documenting: if I do
 Jouni> h=3Dplot(...), I can query the current values of all
 Jouni> properties with get:
This is a very useful feature in matplotlib. Thanks for your patch.
I ended up implementing this functionality, but using a different
approach than your query methods. Instead, I added formatted strings
to the doc strings of each setter that describe what that function
accepts, eg
 def set_linestyle(self, s):
 """
Set the linestyle of the line
ACCEPTS: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]
 """
set now parses this information and uses it to display the
properties. In the CVS version of matplotlib, you can get this
information, as in matlab, with
# report accepts info on all properties
set(line)
# report accepts info on linestyle property
set(line, 'linestyle')
# print the value of all properties
get(line)
# print the value of the linestyle property
get(line, 'linestyle')
Very nice! See the files examples/set_and_get.py in CVS. Here is
some sample output
1 >>> lines =3D plot([1,2,3])
2 >>> set(lines)
 alpha: float
 antialiased or aa: [True | False]
 clip_box: a matplotlib.transform.Bbox instance
 clip_on: [True | False]
 color or c: any matplotlib color - see help(colors)
 dashes: sequence of on/off ink in points
 data: (array xdata, array ydata)
 data_clipping: [True | False]
 figure: a matplotlib.figure.Figure instance
 label: any string
 linestyle or ls: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]
 linewidth or lw: float
 lod: [True | False]
 marker: [ '+' | ',' | '.' | '1' | '2' | '3' | '4' | '<' | '>' |
 'D' | 'H' | '^' | '_' | 'd' | 'h' | 'o' | 'p' | 's' | 'v' | 'x' |
 '|' ]
 markeredgecolor or mec: any matplotlib color - see help(colors)
 markeredgewidth or mew: float
 markerfacecolor or mfc: any matplotlib color - see help(colors)
 markersize or ms: float
 transform: a matplotlib.transform transformation instance
 vertical_offset: DEPRECATED
 visible: [True | False]
 xclip: (xmin, xmax)
 xdata: array
 yclip: (ymin, ymax)
 ydata: array
3 >>> .
Thanks for the suggestion!
JDH
From: John H. <jdh...@ac...> - 2004年11月26日 16:59:46
>>>>> "Transier," == Transier, Frederik <fre...@sa...> writes:
 Frederik> Hello, while I was trying to build the matplotlib 0.64
 Frederik> with python 2.4 on my win xp machine
 Frederik> a lot of errors occurred. Has anyone managed to install
 Frederik> it under these conditions?
 Frederik> Or is there any location I can download the binaries
 Frederik> for python 2.4 and win xp?
 Frederik> Any help would be appreciated.
Building on windows is a pain. I'll try to include a python2.4rc1
installer with the next release, possibly next week. If you need
something sooner, you'll have to post some more information to the
list. Have you read the instructions for building win32 in
setupext.py, and downloaded the win32_static file from the matplotlib
web site that is pointed to in setupext?
JDH
 
From: John H. <jdh...@ac...> - 2004年11月26日 16:57:29
>>>>> "Darrell" == Darrell Silver <da...@cl...> writes:
 Darrell> Hi, first time user, first time installer...
 Darrell> Is there a howto for matplotlib installation on redhat
 Darrell> 7.3/as2.1 & as3.0?
 Darrell> I'm trying to install matplotlib on these platforms and
 Darrell> am running into a seemingly endless list of dependancies
 Darrell> for python2.2, numarray:
 Darrell> just on the 7.3 side, - freetype >= 2.1.7 is needed, but
 Darrell> rh has 2.0.9-2. - pygtk >= 1.99.16 needed, rh has
 Darrell> 1.99.8-7. - pygtk 2.2.0 needs glib >= 2.2.0, redhat has
 Darrell> 1.2.10-5, - pygtk 1.99.16 compiles, but I get error
 Darrell> "ImportError: /usr/lib/libpangoxft-1.0.so.0 undefinded
 Darrell> symbol: FT_Seek_Stream", which I haven't tracked down
 Darrell> just yet... - the line "inf = infty = Infinity =
 Darrell> _ieee.inf" in na_imports.py fails to find 'inf' in
 Darrell> '_ieee', but commenting it out works fine. - While the
 Darrell> install webpage says I only need freetype,libpng,zlib to
 Darrell> compile, I get runtime complaints on import of
 Darrell> matplotlib.matlab * (running simple_plot.py) about
 Darrell> missing image libraries if I don't turn the BUILD_IMAGE
 Darrell> flag on.
I have compiled matplotlib on 7.3 but it's been a while. Rather than
upgrading to the latest pygtk, which will require a major upgrade of
all your gtk libs and their dependencies, try getting pygtk-1.99.16.
Since you already have pygtk-1.99.x, I think you should be able to
compile this. And install freetype 2.1.7 or later, and numarray 1.1
or later, and try again. With luck, with these packages you'll
get much farther. 
I suggest you try to compile pygtk with --enable-thread and
--enable-numpy
When building matplotlib, set the following in setup.py
BUILD_IMAGE = 1
BUILD_AGG = 1
BUILD_GTKAGG = 1
BUILD_TKAGG = 0
BUILD_WINDOWING = 0
If you can't build, please post the build output to the list and we'll
take it from there.
Good luck!
JDH
 Darrell> This is all way too difficult me as I'm not looking
 Darrell> forward to upgrading so many packages across our
 Darrell> production machines...am I missing something obvious?
 Darrell> Perhaps an older version of matplotlib known to work on
 Darrell> this redhat? I'm just using it for simple time-series
 Darrell> plots, real-time and to some file (png, gif, ps, pdf...).
 Darrell> thanks in advance for any help,
 Darrell> Darrell
 Darrell> -------------------------------------------------------
 Darrell> SF email is sponsored by - The IT Product Guide Read
 Darrell> honest & candid reviews on hundreds of IT Products from
 Darrell> real users. Discover which products truly live up to the
 Darrell> hype. Start reading
 Darrell> now. http://productguide.itmanagersjournal.com/
 Darrell> _______________________________________________
 Darrell> Matplotlib-users mailing list
 Darrell> Mat...@li...
 Darrell> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: John H. <jdh...@ac...> - 2004年11月26日 16:49:19
>>>>> "christophe" == christophe grimault <chr...@no...> writes:
 christophe> The import of the numeric version of the _transforms
 christophe> module, _nc_transforms, failed. This is either
 christophe> because numeric was unavailable when matplotlib was
 christophe> compiled, or because a dependency of _nc_transforms
 christophe> could not be satisfied. If it appears that
 christophe> _nc_transforms was not built, make sure you have a
 christophe> working copy of numeric and then re-install
 christophe> matplotlib. Otherwise, the following traceback gives
 christophe> more details:
Try rm -rf ing your build directory and your site-packages/matplotlib
directory and do a clean rebuild and reinstall. We've seen a lot of
problems not too different from yours when installing recent versions
of matplotlib over older versions. If you're still encountering
troubles, post back and we'll try something different.
 christophe> ImportError:
 christophe> /usr/local/lib/python2.3/site-packages/matplotlib/_nc_transforms.so:
 christophe> undefined symbol: _ZNSs4_Rep20_S_empty_rep_storageE
This is a linker error, I don't think changing your include paths will
help.
 christophe> I tried many things in the setupext.py. Freetype is
 christophe> correctly installed and Numeric is in
 christophe> /opt/Numeric23.1. I added this to the
 christophe> script.... because the way it appends include/lib path
 christophe> seems a little buggy to me.
 christophe> I also tried other things. I still get the same error
 christophe> message. I'm stuck ! Has anyone encoutered this
 christophe> problem ? solved it ? Shall i install a newer version
 christophe> of Numeric ? In an other place than /opt ?
matplotlib certainly works with Numeric 23.1. I would advise you to
upgrade to the latest Numeric because many bugs have been fixed since
23.1, but it won't stop matplotlib from working. 
JDH
From: John H. <jdh...@ac...> - 2004年11月26日 16:43:16
>>>>> "Daniel" == Daniel Newton <da...@ne...> writes:
 Daniel> Hi, I am trying to make a legend transparent (using
 Daniel> GTKAgg) as sometimes it is quite big an obscures part of
 Daniel> my graphs.
 Daniel> I have tryed this with no luck: l = figure.legend(lines,
 Daniel> names, legend) l.set_alpha(.5)
 Daniel> is this possible?
Is it the entire legend you want to make transparent, or simply the
rectangular background? For the latter, you need to set the alpha on
the legend "frame". You have two options here
leg = legend(blah, blah)
leg.draw_frame(False) # turn it off entirely
or 
frame = leg.get_frame()
frame.set_alpha(0.5) # make it semi-transparent
See http://matplotlib.sf.net/examples/legend_demo.py for an example of
getting handles to all the lines, patches and texts in the legend,
whose properties you can set independently.
There has been a discussion on whether it would be desirable for a set
call on an object to propagate to all the objects it contains. Ie,
would it be a good thing to be able to do
set(leg, alpha=0.5) 
and have this propogate to the legend frame, lones, patches, and text
instances. Or is the current setup where you control each of these
objects independently preferable?
JDH
From: christophe g. <chr...@no...> - 2004年11月26日 09:31:27
Hi all,
I've successfully used version 0.52. Yesterday I installed v0.64 on my 
RH9 linux box. The build and install went OK. However, when I try to 
play with it, I get:
The import of the numeric version of the _transforms module, 
_nc_transforms, failed.
This is either because numeric was unavailable when matplotlib was compiled,
or because a dependency of _nc_transforms could not be satisfied.
If it appears that _nc_transforms was not built, make sure you have a 
working copy of
numeric and then re-install matplotlib. Otherwise, the following 
traceback gives more details:
Traceback (most recent call last):
....
 from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as 
FigureCanvas
 File 
"/usr/local/lib/python2.3/site-packages/matplotlib/backends/__init__.py", 
line 20, in ?
 globals(),locals(),[backend_name])
 File 
"/usr/local/lib/python2.3/site-packages/matplotlib/backends/backend_wxagg.py", 
line 18, in ?
 from backend_agg import FigureCanvasAgg
 File 
"/usr/local/lib/python2.3/site-packages/matplotlib/backends/backend_agg.py", 
line 78, in ?
 from matplotlib.backend_bases import RendererBase,\
 File 
"/usr/local/lib/python2.3/site-packages/matplotlib/backend_bases.py", 
line 13, in ?
 from patches import Rectangle
 File "/usr/local/lib/python2.3/site-packages/matplotlib/patches.py", 
line 5, in ?
 from artist import Artist
 File "/usr/local/lib/python2.3/site-packages/matplotlib/artist.py", 
line 4, in ?
 from transforms import identity_transform
 File 
"/usr/local/lib/python2.3/site-packages/matplotlib/transforms.py", line 
188, in ?
 from _transforms import Value, Point, Interval, Bbox, Affine
 File 
"/usr/local/lib/python2.3/site-packages/matplotlib/_transforms.py", line 
11, in ?
 from matplotlib._nc_transforms import *
ImportError: 
/usr/local/lib/python2.3/site-packages/matplotlib/_nc_transforms.so: 
undefined symbol: _ZNSs4_Rep20_S_empty_rep_storageE
I tried many things in the setupext.py. Freetype is correctly installed 
and Numeric is in /opt/Numeric23.1. I added this to the script.... 
because the way it appends include/lib path seems a little buggy to me.
def add_ft2font_flags(module):
 'Add the module flags to build extensions which use gd'
 ....
 module.include_dirs.append('/usr/local/include/freetype2/freetype')
 ....
and
def add_agg_flags(module):
 'Add the module flags to build extensions which use agg'
 # before adding the freetype flags since -z comes later
 module.libraries.append('png')
 module.libraries.append('z')
 add_base_flags(module)
 module.include_dirs.extend(['src','agg22/include', '.'])
 module.include_dirs.append('/opt/Numeric-23.1/Include')
 # put these later for correct link order
 module.libraries.extend(['stdc++', 'm'])
I also tried other things. I still get the same error message. I'm stuck 
! Has anyone encoutered this problem ?
solved it ? Shall i install a newer version of Numeric ? In an other 
place than /opt ?
Any help would be geatly appreciated !
Christophe
From: Daniel N. <da...@ne...> - 2004年11月26日 02:45:51
Hi,
I am trying to make a legend transparent (using GTKAgg) as sometimes it 
is quite big an obscures part of my graphs.
I have tryed this with no luck:
 l = figure.legend(lines, names, legend)
 l.set_alpha(.5)
is this possible?
Thanks
Dan

Showing 7 results of 7

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 によって変換されたページ (->オリジナル) /