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




Showing 10 results of 10

From: John H. <jdh...@ac...> - 2005年05月20日 22:23:57
>>>>> "Jeff" == Jeff Peery <jef...@se...> writes:
 Jeff> Hi again, my operating system is windows 2000 professional,
 Jeff> and I'm using python 2.4, wxpython 2.5.5, and
 Jeff> matplotlib-0.80.win32-py2.4.exe. I attached my code. The
 Jeff> problem is that the program crashes when I try to close a
 Jeff> plot or plot a second plot. Any ideas how to make this work?
 Jeff> Thanks.
Don't import pylab while using the OO API -- see
examples/embedding_in_wx*.py and 
 http://matplotlib.sourceforge.net/faq.html#OO
 
Should help...
From: Jeff P. <jef...@se...> - 2005年05月20日 19:38:01
Attachments: sample.py
#!/usr/bin/env python
#Boa:App:BoaApp
import wx
import sample
modules ={'sample': [1, 'Main frame of Application', 'none://sample.py']}
class BoaApp(wx.App):
 def OnInit(self):
 wx.InitAllImageHandlers()
 self.main = sample.create(None)
 # needed when running from Boa under Windows 9X
 self.SetTopWindow(self.main)
 self.main.Show();
 return True
def main():
 application = BoaApp(0)
 application.MainLoop()
if __name__ == '__main__':
 main()
From: John H. <jdh...@ac...> - 2005年05月20日 16:18:16
>>>>> "John" == John Gill <jn...@eu...> writes:
 John> Attached is a patch to collections.py and legend.py to make
 John> the auto-legend stuff smarter.
 John> A couple of caveats.
 John> The new code doesn't makes as much use of C++ -- there might
 John> be performance issues for plots with large numbers of
 John> points, although I haven't encountered any.
 John> I don't think any of my tests include plots with
 John> LineCollections, so there is a reasonable chance that code
 John> in _auto_legend_data has not been exercised.
 John> Other than that, it seems to do the trick.
Thanks John, also added to CVS. I think this could be extremely slow
for very large lines (100k points, for example) but I don't see that
as a real problem because auto placement is not the default for
legends (for precisely this reason).
Cheers!
JDH
From: John H. <jdh...@ac...> - 2005年05月20日 16:11:37
>>>>> "John" == John Gill <jn...@eu...> writes:
 John> Attached is a patch to the axes code that adds an extra
 John> paramter, linewidths, to the scatter method.
 John> My motivation for this wa I didn't want the black borders
 John> around all the points in my plot.
This is a common wish -- just as a warning, using a linewidth of 0
does not work across backends; for example, I think it fails on PS.
The standard way to do it is to set the edgecolors to be the same as
the facecolors. To support this, I also added a boolean kwarg,
faceted=True and when False, sets the edge colors to be the same as
the facecolor. I also added your linewidth changes.
axes.py revision 1.103 or later ...
Thanks!
JDH
From: John G. <jn...@eu...> - 2005年05月20日 10:21:43
Attachments: legend.patch
Attached is a patch to collections.py and legend.py to make the 
auto-legend stuff smarter.
A couple of caveats.
The new code doesn't makes as much use of C++ -- there might be 
performance issues for plots with large numbers of points, although I 
haven't encountered any.
I don't think any of my tests include plots with LineCollections, so 
there is a reasonable chance that code in _auto_legend_data has not been 
exercised.
Other than that, it seems to do the trick.
John
From: John G. <jn...@eu...> - 2005年05月20日 09:02:44
Attachments: scatter.patch
Attached is a patch to the axes code that adds an extra paramter, 
linewidths, to the scatter method.
My motivation for this wa I didn't want the black borders around all the 
points in my plot.
This allows you to do:
scatter(y, x, c=z, linewidths=(0.0,))
and get some really pretty plots, similar to using pcolor/imshow, but 
works when your points are not neatly aligned in a grid.
John
From: John H. <jdh...@ac...> - 2005年05月20日 02:39:59
>>>>> "Ryan" == Ryan Krauss <rya...@co...> writes:
 Ryan> I have a question about tick formatting. I have a semilogx
 Ryan> plot and if I resize the xticks using locs , labels = xticks
 Ryan> () set(labels , size=ticksize) I like the size and the font,
 Ryan> but the exponents (10^0) run into the axis.
The reasons for are complicated and have to do with an optimization to
make exponential ticking faster, and I won't go into them right now.
Suffice it to say that it is a bug, but there may be a workaround
Do any of the suggestions here help?
 http://matplotlib.sourceforge.net/faq.html#TEXTOVERLAP
Note you can also control the "pad" in points of the offset of the
ticks from the xaxis
 ticks = ax.xaxis.get_major_ticks()
 for tick in ticks:
 tick.set_pad(6)
or if you prefer
 set(ax.xaxis.get_major_ticks(), pad=6)
The default pad is controlled by an rc parameter
 tick.major.pad : 4 # distance to major tick label in points
 tick.minor.pad : 4 # distance to the minor tick label in points
See http://matplotlib.sf.net/.matplotlibrc
JDH
From: Ryan K. <rya...@co...> - 2005年05月20日 02:00:37
I have a question about tick formatting. I have a semilogx plot and if 
I resize the xticks using
locs , labels = xticks ()
set(labels , size=ticksize)
I like the size and the font, but the exponents (10^0) run into the axis.
If I size them using
xticks([1,10],[r'10ドル^0$',r'10ドル^1$'],size=ticksize,family='sans=serif')
I can get the position right (i.e. not running into the axis), but I 
have to set the ticks manually and I can't seem to get away from a math 
font I don't really like.
Is there a better way to do this?
Thanks,
Ryan
From: Fernando P. <Fer...@co...> - 2005年05月20日 01:14:30
Ryan Krauss wrote:
> Looking at the code, it seems like SystemExit is raised any time the png doesn't 
> already exist.
> I am running these lines inside ipython, if that matters. Something about my 
> system doesn't like the SystemExit being raised.
yes, it's an annoyance of ipython whenever you run anything with a SystemExit 
in it. The .14 release of ipython has a new -e switch to ignore exit calls, 
so you don't get all that noise (use 'run -e fooscript').
If you feel adventurous, I put yesterday a release candidate here:
http://ipython.scipy.org/dist/testing/
Let me know of any problems you encounter though, I'd like this to really fix 
all known glitches for a while so I can concentrate only on new development.
Best,
f
From: Ryan K. <rya...@co...> - 2005年05月20日 00:41:31
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
 <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Thanks again John.&nbsp; The newest texmanager.py worked great.<br>
<br>
John Hunter wrote:
<blockquote cite="mid...@pe..."
 type="cite">
 <blockquote type="cite">
 <blockquote type="cite">
 <blockquote type="cite">
 <blockquote type="cite">
 <blockquote type="cite">
 <pre wrap="">"Ryan" == Ryan Krauss <a class="moz-txt-link-rfc2396E" href="mailto:gt...@ma...">&lt;gt...@ma...&gt;</a> writes:
 </pre>
 </blockquote>
 </blockquote>
 </blockquote>
 </blockquote>
 </blockquote>
 <pre wrap=""><!---->
 Ryan&gt; I would like to use Matplotlib for automatically generating
 Ryan&gt; reports in HTML. I would like to do this without having to
 Ryan&gt; use latex first and the convert from there (it would be much
 Ryan&gt; faster to make my own HTML directly and I don't need lots of
 Ryan&gt; complicated features yet). Has anyone already done this who
 Ryan&gt; is willing to share code with me?
 Ryan&gt; One thing I need to do that would make this work really well
 Ryan&gt; is to generate little PNG's of symbols and formulas to use
 Ryan&gt; in line with text in the HTML (sort of how LaTeX2HTML
 Ryan&gt; handles using $\theta$ in line. Is there a way to use the
 Ryan&gt; TeX rendering system used on figures to make little PNG's
 Ryan&gt; with just TeX expressions on them (i.e. theta.png)?
TeX/LaTeX plus dvipng is really the right way to solve this problem.
Coincidentally, I have been working to incorporate tex into
backend_agg via dvipng (and into backend_ps via psfrag) and matplotlib
has a tex manager class
So if you don't mind installing tex and dvipng (on my Ubuntu system is
is simply 
 &gt; sudo apt-get install dvipng
then you can use the matplotlib texmanager class to handle the system
calls, cacheing results it's seen before and so on
 &gt;&gt;&gt; from matplotlib.texmanager import TexManager
 &gt;&gt;&gt; m = TexManager()
 &gt;&gt;&gt; pngfile = m.make_png("\TeX\ is Number $e^{-i\pi}$!", dpi=100)
 &gt;&gt;&gt; print pngfile
 /home/jdhunter/.tex.cache/5b723d2ea8d0f15af94ec585aece1582_100.png
You need to make sure you have texmanager revision 1.2 from CVS (or
later). 
Of course if you are on a platform where TeX is not easily installed,
this won't help much. In that case, you can use matplotlib to create
the math images for you, but I would use the mathtext parser directly
rather than the whole figure / axes api.
Let me know if you still want/need to use mpl for this and I'll give
you some pointers.
JDH
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
<a class="moz-txt-link-freetext" href="http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click">http://ads.osdn.com/?ad_id=7412&amp;alloc_id=16344&amp;op=click</a>
_______________________________________________
Matplotlib-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Mat...@li...">Mat...@li...</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/matplotlib-users">https://lists.sourceforge.net/lists/listinfo/matplotlib-users</a>
 </pre>
</blockquote>
<br>
</body>
</html>

Showing 10 results of 10

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