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

Showing results of 356

<< < 1 .. 13 14 15 (Page 15 of 15)
From: Fernando P. <fpe...@gm...> - 2008年02月01日 07:23:27
Hi all,
sorry for the quick cross-post, but I know that many mpl users rely on
the ipython -pylab support for interactive work.
This is a call for testing from current SVN of anyone who uses ipython
with the GUI thread support, whether via -pylab or directly via one of
the -Xthread options.
For a long time I've known that this code was subject to possible
deadlocks, having seen it go nuts on me on occasion, but I'd never
been able to track down the exact source of the race conditions
causing it (I'm not an expert in threads at all). In
http://ipython.scipy.org/ipython/ipython/ticket/210
http://ipython.scipy.org/ipython/ipython/ticket/212
a very helpful analysis and solution code was provided by Marc. I've
applied his fixes to current SVN, and with my testing so far I've been
unable to get any more deadlocks or crashes, so this looks great, and
his analysis looks very sound to me. In particular, it makes proper
use of a re-entrant lock which I'd originally tried to use but given
up on, due to having used it incorrectly (though I knew it should be
the right tool). I'd just left a comment noting the issue, which
Marc's fixes now address.
It would be great if any of you who relies on the GUI thread support
could test this, since this threaded code is subtle and has a long
history of hard to trigger but annoying bugs. You can run it from
SVN. In a few minutes I'll finish uploading test builds as well to
http://ipython.scipy.org/dist/testing/
if you prefer to install from there.
I'd appreciate feedback, either of improvements or of any remaining misbehavior.
Thanks, especially to Marc for helping us make progress on this
long-standing nag.
Cheers,
f
From: Wayne E. H. <wh...@pa...> - 2008年02月01日 04:13:43
Eric:
I have never seen any software which dealt with non uniform DPI 
settings, although that is always a possibility. And all the displays I 
have ever worked on/with have been the same for both H and V. ( I am a 
display engineer with over 25 years experience in CRT displays and a bit 
in flat panel). From what I have seen, the RGB trio in any display is 
set up so that the horizontal pitch is the same as the vertical pitch. 
In a flat panel the R, G and B are 3 times taller than they are wide so 
that when you place R, G and B together they form a square. I don't 
think that Matplotlib or Alan needs to worry about anything outside 
those boundaries.
Wayne
Eric Firing wrote:
> John Hunter wrote:
> 
>> On Jan 31, 2008 12:54 AM, Eric Firing <ef...@ha...> wrote:
>>
>> 
>>> Screens vary. The screen on my laptop has about 130 dpi. Desktop flat
>>> panels will usually have a smaller value than that. For example, an old
>>> "15-inch" flat panel with 1024/768 pixels is actually about 12 inches
>>> wide, so dpi=85. The mpl default 'figure.dpi' of 80 is low; I doubt
>>> 
>> And it is not unusual to have a different DPI in the horizontal and
>> vertical directions. In order to support true physical sizes on the
>> screen, we would need to support different dpis in the two directions.
>> 
>
> Does any other software actually do this? I have never seen anything 
> with more than a single dpi setting. What is an example of a display 
> with non-square pixels? And how non-square are they? I suspect this is 
> not something that Alan really needs to worry about.
>
> Eric
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> 
From: Stephen G. <ste...@op...> - 2008年02月01日 02:36:37
Hi Rich,
bit confused what your asking.
are you looking for the pylab API savefig
http://matplotlib.sourceforge.net/matplotlib.pyplot.html#-savefig
or you asking how to convert your variable+.png into a filename?
is your variable a number?, string?
for count in range(3):
 count = count +1
 fname = 'MyPlot_%d.png' %count
 print fname
mystr = 'MyFirstPlot'
fname = '%s.png' % mystr
print fname
results in
 >python -u "test.py"
MyPlot_1.png
MyPlot_2.png
MyPlot_3.png
MyFirstPlot.png
 >Exit code: 0
pylab.savefig('%s.png'% curVar)
 or
pylab.savefig('%d.png'% curVar)
Does anything here help?
Steve
Rich Shepard wrote:
> I want to save plots programmatically, using a variable + .png as the
> filename. I don't see an example of the proper syntax, and my
> trial-and-error approach hasn't yielded a solution, either.
>
> If I want to write
>
> 	pylab.save(curVar.png)
>
> where 'curVar' is a variable assigned programmatically, how do I correctly
> write it?
>
> Rich
>
> 
From: Alan G I. <ai...@am...> - 2008年02月01日 02:32:44
On 2008年1月31日, Rich Shepard apparently wrote:
> If I want to write
> 	pylab.save(curVar.png)
> where 'curVar' is a variable assigned programmatically, how do I correctly 
> write it? 
Use string concatenation:
curVar+'.png'
<URL:http://docs.python.org/tut/node5.html#SECTION005120000000000000000>
hth,
Alan Isaac
From: Rich S. <rsh...@ap...> - 2008年02月01日 01:56:52
 I want to save plots programmatically, using a variable + .png as the
filename. I don't see an example of the proper syntax, and my
trial-and-error approach hasn't yielded a solution, either.
 If I want to write
 	pylab.save(curVar.png)
where 'curVar' is a variable assigned programmatically, how do I correctly
write it?
Rich
-- 
Richard B. Shepard, Ph.D. | Integrity Credibility
Applied Ecosystem Services, Inc. | Innovation
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
From: Tim M. <tim...@gm...> - 2008年02月01日 00:08:24
Hello Fernando,
>> <type 'exceptions.AttributeError'>: 'module' object has no attribute
>> 'ArrayType'
>>
>> maybe some of the IPython power users can give me a hint why this
>> happes. [1]
> 
> Very strange. I can't reproduce it here (on gutsy, but running
> ipython from my own tree). What's odd is this:
> 
> In [1]: import Numeric
> 
> In [2]: print Numeric.ArrayType
> <type 'array'>
> 
> 
> So Numeric *most definitely* has an ArrayType member. Try doing the
> same as I did, also showing us whether you started ipython with -pylab
> or not. There may be something odd about your Numeric installation.
> Also do this:
> 
> In [3]: Numeric?
> Type: module
> Base Class: <type 'module'>
> Namespace: Interactive
> File: /usr/lib/python2.5/site-packages/Numeric/Numeric.py
> 
> [etc]
> 
> It's possible that you have in your path a file called Numeric.py
> which is not the 'real' Numeric module. This would explain your
> problem and why nobody else sees it.
> 
> Cheers,
> 
> f
*** my output ***
$ ipython
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
Type "copyright", "credits" or "license" for more information.
IPython 0.8.1 -- An enhanced Interactive Python.
? -> Introduction to IPython's features.
%magic -> Information about IPython's 'magic' % functions.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: import Numeric
In [2]: print Numeric.ArrayType
---------------------------------------------------------------------------
<type 'exceptions.AttributeError'> Traceback (most recent call last)
/home/timmie/<ipython console> in <module>()
<type 'exceptions.AttributeError'>: 'module' object has no attribute 
'ArrayType'
In [3]: Numeric?
Type: module
Base Class: <type 'module'>
String Form: <module 'Numeric' from 
'/home/timmie/development/python/modules/modules_library/Numeric/__init__.pyc'>
Namespace: Interactive
File: 
/home/timmie/development/python/modules/modules_library/Numeric/__init__.py
Docstring:
 <no docstring>
In [4]:
*** end code ***
=> You were absolutely right:
I had another Numeric package install in my PYTHONPATH. It overwrode the 
system package at:
/usr/lib/python2.5/site-packages/Numeric/Numeric.py
I just deleted 
/home/timmie/development/python/modules/modules_library/Numeric and now 
everything to goes nice. I can use my Ipython again with numerics ;-)
Well, I guess the problem arose from the a time when I didn't have 
network access.
I just threw python modules from the net into my PYTHONPATH without 
using the Synaptic package manager.
Nice that this is now solved. Thanks for your quick answer and help!
Kind regards,
Timmie
3 messages has been excluded from this view by a project administrator.

Showing results of 356

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