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

Showing 3 results of 3

From: Eric F. <ef...@ha...> - 2005年04月23日 20:38:54
Attachments: contour_demo.py
Jim,
 >Using matplotlib 0.74.
 >The default linestyle for contour lines representing values less than
 >zero should be dashed.
 >I have used this in the past ( I guess prior to 0.74) but now the
 >behavior is different.
 >The default appears to be a greyscale color map - all solid lines.
 >Looking at the code - line 768 of contour.py, the negative lines are
 >dashed if Ncolors == 1.
 >As far as I can tell, there is no way for this to be true. The code
 >change to rectify this is trivial,
 >but I may be missing something.
I made the change to which you refer, that is, adding the condition 
"Ncolors == 1" to the test for changing to dashed lines. My rationale 
is that the default is to color the lines with the default colormap, in 
which case the level information is in the colors, and making the 
negative values dashed just adds clutter. If the intent is to use 
simple black (or any other single color) lines, then one uses the kwarg 
"colors=('k',)" (for example), in which case Ncolors == 1, and the 
negative lines are dashed. This is illustrated in the attached script.
If you don't specify a colormap, the default is taken from your 
.matplotlibrc file if it exists, otherwise from the system default 
.matplotlibrc: specifically, the line
image.cmap : jet # gray | jet
The present system default is jet, not gray, so I presume it is your own 
.matplotlibrc file that is changing the default to gray.
Note that contour returns two arguments: a list of contour levels, and a 
corresponding list of LineCollections, which make it quite easy to 
change the line properties. If you want multicolored lines dashed for 
negative levels, you can do something like this:
levs, colls = contour(Z, cmap=hot())
for lev, coll in zip(levs, colls):
 if lev < 0:
 coll.set_linestyle((0, (6.,6.)),)
My inclination is to keep the default behavior rather simple, and let 
people customize as above. It is debatable whether the default even for 
single-color lines at negative levels should be dashed; I think a better 
design, more consistent with matlab and with the spirit of matplotlib, 
would be to leave this out.
We could also add support for a linestyles kwarg, similar to the 
linewidths kwarg that contour already accepts.
Eric
From: John H. <jd...@gm...> - 2005年04月23日 14:45:12
On 4/22/05, Pujo Aji <aj...@gm...> wrote:
> Error message:
> Microsoft Visual C++ Runtime Library
> Assertion failed!
> Program:c\python24\python.exe
> File:CXX/cxx_extentions.cxx
> Line:1031
>=20
> Expression: ob_refcnt =3D=3D 0
> For information on how your program can cause an assertion
> failure, see the Visual C++ documentation on asserts
>=20
> First I install in new computer python 2.4.1
> then the error comes out.
>=20
> So I tried to reinstall with python 2.4
> The problem still comes.
Hmm, that's a strange one. We've seen this once before
http://sourceforge.net/mailarchive/message.php?msg_id=3D8789882
and I can't remember what the solution was (the thread doesn't mention
it) but it was resolved. I've CCd Gregory on this email to see if he
can remember, since he once saw the same problem .
Are you using the python from python.org? Does it help if you remove
site-packages/matplotlib and then reinstall? Please create this
simple test script
 import pylab
 pylab.plot([1,2,3])
 pylab.show()
and run it with
> c:\python24\python myscript.py --verbose-helpful
and paste in all the output and errors in your response after doing a
clean reinstall, as well as your OS information ....
JDH
From: John H. <jd...@gm...> - 2005年04月23日 14:36:25
On 4/22/05, ch...@ll... <ch...@ol...> wrote:
 > There is beginning interest in this quality library=20
 > on AIX 5.x. Is a port planned, and when might it be
 > available?
I've never worked on AIX, but the steps there should be the same as
elsewhere -- mpl has been compiled on a number of UNIX boxes. Make
sure you have the dependencies on your system (zlib, libpng and
freetype with development headers). Add an entry in setupext.py in
the basedirs dictionary, where the key is your sys.platform and the
value is a list of paths in which matplotlib should search for
dependencies (eg /opt, /usr/local, whatever). You will probably have
the best luck trying to compile with gcc but this may not be an
option. If your compiler is C++ standards compliant, and the
matplotlib compile fails because of some noncompliant code, I'll treat
this as a bug and try and fix it. Unfortunately, I don't have access
to an AIX system which makes it a little slower to find and fix these
problems. Perhaps there is an AIX system on the sourceforge compile
farm -- anyone want to volunteer into looking into the compile farm
options :-) ?
Basically, I suggest you try following the instructions at
http://matplotlib.sf.net/installing.html and see how far you get, and
report the errors you get when tyring to compile as well as the
compiler you are using and other relevant information.
Good luck!
JDH

Showing 3 results of 3

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