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




Showing 6 results of 6

From: Peter G. <pgr...@ge...> - 2004年08月02日 23:33:46
> .....
> But you can also create your own color maps at any time using the
> cm.get_cmap function
>
> >>> jet512 = cm.get_cmap('jet', 512)
> >> imshow(X, cmap=jet512)
>
> Should work.
>
Yes, thanks.
Just one more question. Recently (in the last couple of versions I 
think), there has been a change and now the 'o' line markers (circles) 
are filled in by default.
For example:
 plot(xp,yp,'ok')
gives sold black circles.
I would like my circles to not be filled; just have the border so that 
the inside is transparent.
Is this something that is settable?
Thanks,
-- 
Peter Groszkowski Gemini Observatory
Tel: +1 808 974-2509 670 N. A'ohoku Place
Fax: +1 808 935-9235 Hilo, Hawai'i 96720, USA
From: John H. <jdh...@ac...> - 2004年08月02日 16:20:07
>>>>> "Vineet" == Vineet Jain <vi...@al...> writes:
 Vineet> After making changes to has_data I get the following:
 Vineet> (0.0, 400.0) (0.0, 400.0) (0.0, 400.0)
 Vineet> which is not correct it should be:
 Vineet> (300.0, 400.0) (100.0, 400.0) (100.0, 400.0)
I'm not sure this is incorrect. matplotlib distinguishes between the
data limits and the view limits. The latter are automatically
adjusted to include the data limits but may incorporate more. For
example, the x data limits in [0.1, 10] may produce view limits
[0,10].
If you need the view limits to always equal the data limits, you could
provide a custom ticker, as described in
http://matplotlib.sourceforge.net/matplotlib.ticker.html and
illustrated in the example
http://matplotlib.sourceforge.net/examples/custom_ticker1.py.
You might want to verify that the data limits are correct by printing
 ax.dataLim.intervalx().get_bounds() # the x limits
 ax.dataLim.intervaly().get_bounds() # the y limits
where ax is your Axes instance. You can compare these with
 ax.viewLim.intervalx().get_bounds() # the x limits
 ax.viewLim.intervaly().get_bounds() # the y limits
JDH
From: John H. <jdh...@ac...> - 2004年08月02日 16:08:33
>>>>> "Kenneth" == Kenneth McDonald <ken...@sb...> writes:
 Kenneth> Does any exist? I looked through the distribution and
 Kenneth> didn't see anything, but then, that doesn't prove
 Kenneth> anything :-)
There is no official documentation, but there are a few resources
 * The class documentation at
 http://matplotlib.sourceforge.net/classdocs.html
 * the examples embedding_in*.py in the examples directory.
 * examples/pythonic_matplotlib.py describes the translation from the
 matlab style interface to the pythonic, OO interface
 * Another good resource is matlab.py. This is just a thin wrapper
 to the API, so you can look and see how it is done there,
 translating all the gcf() calls to your figure instance, all the
 gca() calls to your axes instance, and so on.
Other than that, you can post here...
I'm working on some additional documentation but it is not ready yet.
JDH
From: John H. <jdh...@ac...> - 2004年08月02日 16:02:08
>>>>> "Mathias" == Mathias Franzius <mat...@we...> writes:
 Mathias> Dear NG, I have a problem mwith the installation of
 Mathias> matplotlib under redhat 9 and python 2.3.2. I first
 Mathias> updated all relevant packages (see [1]). Building
 Mathias> matplotlib with default setup.py seemd to be ok, except
 Mathias> two types of warnings (see [2]). Install showed no errors
 Mathias> as well. When importing matplotlib I get the following
 Mathias> error:
The warnings you posted are completely harmless. 
 Mathias> What could be the problem? The directory
 Mathias> /usr/lib/python2.3/site-packages/matplotlib/ contains
 Mathias> transforms.py and _transforms.so but no _transforms.py -
 Mathias> is that ok?
Yes, this is OK. There is no _transforms.py
My guess is you are trying to run matplotlib from the build dir. You
cannot do this, because python finds the matplotlib src dir named
matplotlib and tries to load that. There is no _transforms module in
that dir, but there is in site-packages so you should be OK. cd into
another directory, ie your home dir or the examples dir, and try from
there.
This problem bites a number of users. Perhaps we should rename the
base matplotlib python dir in the src tree to something like
matplotlibpy.
JDH
From: John H. <jdh...@ac...> - 2004年08月02日 15:53:41
>>>>> "Peter" == Peter Groszkowski <pgr...@ge...> writes:
 Peter> Hi: How many colors do images created via:
 Peter> imshow(Zi, cmap=cm.jet)
 Peter> (Zi = some data matrix) have?
 Peter> Are these true color? 256? Is there a simple way to define
 Peter> these things?
The following image parameters can be configured from your rc file
### images
image.aspect : free # free | preserve
image.interpolation : bilinear # see help(imshow) for options
image.cmap : jet # gray | jet
image.lut : 256 # the size of the colormap lookup table
image.origin : upper # lower | upper
The image.lut parameter controls the size of the lookup table. You
can change the default in the rc file, or dynamically in a single
python session using the rc function. Eg,
 # default cmap is now 100 level grayscale by cm.jet and cm.gray unaffected
 >>> rc('image', lut=100, cmap='gray')
 >>> imshow(X) # show X with default cmap
But you can also create your own color maps at any time using the
cm.get_cmap function
 >>> jet512 = cm.get_cmap('jet', 512)
 >> imshow(X, cmap=jet512)
Should work.
JDH
From: Mathias F. <mat...@we...> - 2004年08月02日 09:08:59
Dear NG,
I have a problem mwith the installation of matplotlib under redhat 9 and 
python 2.3.2. I first updated all relevant packages (see [1]).
Building matplotlib with default setup.py seemd to be ok, except two 
types of warnings (see [2]). Install showed no errors as well.
When importing matplotlib I get the following error:
 >>> from matplotlib import matlab
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File "matplotlib/matlab.py", line 142, in ?
 from axes import Axes
 File "matplotlib/axes.py", line 9, in ?
 from artist import Artist
 File "matplotlib/artist.py", line 4, in ?
 from transforms import identity_transform
 File "matplotlib/transforms.py", line 180, in ?
 from _transforms import Value, Point, Bbox, Affine
ImportError: No module named _transforms
What could be the problem?
The directory /usr/lib/python2.3/site-packages/matplotlib/
contains transforms.py and _transforms.so but no _transforms.py - is 
that ok?
Thanks for any help,
 Mathias
--------
[1]: zlib, zlib-devel, libpng, libpng-devel, freetype, freetype-devel, 
freetype-utils, gtk2-devel, gtk+-devel, pygtk2, glib-devel, 
pygtk2-devel, gnome-libs-devel, pygtk2-libglade,
tcl, tk, tkinter
[2]: In file included from /usr/include/python2.3/Python.h:8,
 from CXX/Objects.hxx:9,
 from CXX/Extensions.hxx:18,
 from src/_transforms.h:10,
 from src/_transforms.cpp:2:
/usr/include/python2.3/pyconfig.h:847:1: warning: "_POSIX_C_SOURCE" 
redefined
In file included from 
/usr/include/c++/3.2.2/i386-redhat-linux/bits/os_defines.h:39,
 from 
/usr/include/c++/3.2.2/i386-redhat-linux/bits/c++config.h:34,
 from /usr/include/c++/3.2.2/functional:53,
 from src/_transforms.cpp:1:
/usr/include/features.h:131:1: warning: this is the location of the 
previous definition

Showing 6 results of 6

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