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

Showing 12 results of 12

From: Friedrich R. <fri...@gm...> - 2010年07月17日 20:50:01
2010年7月16日 Simon Friedberger <sim...@a-...>:
> Hello List.
>
> I'm trying to plot a confusion matrix and I got this far:
> http://paste.pocoo.org/show/238332/
>
> Basically what I still want to do is get the ticklabels from the bottom
> to the top, have every ticklabel shown and start showing them from the
> first not from the second.
Maybe try to use axes.set_xticks() first, see
http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.set_xticks
.
Your code on pocoo is messed up with whitespace. Is that intentional?
Friedrich
From: Friedrich R. <fri...@gm...> - 2010年07月17日 20:38:35
2010年7月15日 Waléria Antunes David <wal...@gm...>:
> But, i don't know how do...
>
> I tried, but don't, most failed....
Maybe this is something in the direction you want? You have to adapt
the test file.
Friedrich
From: Christoph G. <cg...@uc...> - 2010年07月17日 20:26:21
The matplotlib installers for Windows are built with the 
user-access-control=auto option. Otherwise they would not work correctly 
with UAC on Windows Vista and 7. See also 
http://www.mail-archive.com/mat...@li.../msg13466.html. 
I can provide eggs for the next release.
Python bdist_wininst installers are valid ZIP files. You can open 
matplotlib-1.0.0.win32-py2.6.exe with a ZIP program, e.g. WinRAR, and 
extract the directories/files found under PLATLIB into 
C:\Python26\Lib\site-packages.
Christoph
On 7/17/2010 4:14 AM, Pavlo Shchelokovskyy wrote:
> Hi all,
> on my workplace I use matplotlib in restricted Windows environment.
> Since couple of versions matplotlib Windows installer needs elevated
> user privileges to work (why?), but installation from Python eggs was
> working just fine. However I can not find any eggs for latest
> matplotlib, and those on PyPI are for previous release, i.e. 0.99.3.
> So can somebody point me to Python eggs for matplotlib on Python 2.6
> under Windows? Or how can I build one, for example from working
> installation of matplotlib 1.0.0 on the identical platform?
>
> Best regards,
> Pavlo Shchelokovskyy
>
From: Friedrich R. <fri...@gm...> - 2010年07月17日 19:33:45
2010年7月15日 Benjamin Root <ben...@ou...>:
> Assuming you are using Linux or a Mac, I wonder if it is somehow possible to
> "save" a .ps file to a postscript device? I have never had to do any Linux
> magic with CUPS, so maybe this isn't possible. Anybody else have any
> thoughts?
Normally you can cat the .ps file to lpr or similar:
$ cat file.ps | lpr -P my_printer
$ lpr -P my_printer file.ps
I'm not sure if it works also for eps files.
On mac I'd print it using the system. Actually my first inspection
now shows that apparently you can use lpr also on mac:
$ lpq
HP_LaserJet_4100n_at_CERN_ISOLDE_offices ist bereit
keine Einträge
(meaning the printer is ready and there are no entries)
But I don't know if all printers are listed in the lpq list, because
for me one is missing.
Friedrich
From: Benjamin R. <ben...@ou...> - 2010年07月17日 18:49:37
On Fri, Jul 16, 2010 at 12:34 PM, Simon Friedberger <
sim...@a-... <simon%2Bm...@a-...>> wrote:
> Hello List.
>
> Is it just me or does the alignment in the picture at
> http://matplotlib.sourceforge.net/users/text_props.html
> look off?
>
> Best
> Simon
>
>
Maybe. To me, the rotated "with newlines" text doesn't quite seem to be
rotated about its center, and that is even without any capital letters (it
would look worse with them). The "centered" text to the right seems like it
might be to far to the left, and might look worse with capital letters. And
the "center top" also seems a bit off.
However, checking the PDF version of the image, it looks perfect! So,
either we have a bug in the backend that saves PNG files and the positions
are being calculated right by matplotlib.... or we have a bug in matplotlib
position calculations and the PDF backend that are correcting each other...
My vote is for the former.
Ben Root
From: Daniele P. <dpa...@ya...> - 2010年07月17日 18:37:49
Attachments: plot.png
 Hi everybody,
I have a problem with a plot. I attach a figure to be easily understandable.
As you can see from the figure, I have in the same area a line and a bar 
plot. The problem is that y=0 for right y axis is different with respect 
to left y axis one. I want the two y=0 to be the same.
How can i do that?
Excuse me for my bad english, I'm italian :)
Thanks in advance.
From: Friedrich R. <fri...@gm...> - 2010年07月17日 18:29:13
2010年7月15日 Stephen T. <obs...@ho...>:
> ============================================================================
> BUILDING MATPLOTLIB
>       matplotlib: 1.0.svn
>         python: 2.6.5 (r265:79359, Mar 24 2010, 01:32:55) [GCC
>             4.0.1 (Apple Inc. build 5493)]
>        platform: darwin
> REQUIRED DEPENDENCIES
>         numpy: 1.4.1
>       freetype2: 9.20.3
> OPTIONAL BACKEND DEPENDENCIES
>         libpng: 1.2.35
>        Tkinter: Tkinter: 73770, Tk: 8.4, Tcl: 8.4
>        wxPython: no
>             * wxPython not found
>          Gtk+: no
>             * Building for Gtk+ requires pygtk; you must be able
>             * to "import gtk" in your build/install environment
>    Mac OS X native: yes
>           Qt: no
>          Qt4: no
>         Cairo: no
> OPTIONAL DATE/TIMEZONE DEPENDENCIES
>        datetime: present, version unknown
>        dateutil: matplotlib will provide
>          pytz: matplotlib will provide
> adding pytz
> OPTIONAL USETEX DEPENDENCIES
>         dvipng: 1.9
>      ghostscript: 8.64
>         latex: 3.141592
>        pdftops: 3.02
Exactly what I had in mind, and everything ok so far.
> [...] and then:
> ld warning: in /opt/local/lib/libfreetype.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libz.dylib, file is not of required
> architecture
> ld: in /opt/local/lib/libxml2.2.dylib, file is not of required architecture
> for architecture ppc
> collect2: ld returned 1 exit status
> ld warning: duplicate dylib /opt/local/lib/libz.1.dylib
> lipo: can't open input file:
> /var/folders/Yh/Yh3On1j+FXW+r-334Wk-vk+++TI/-Tmp-//ccUX0Ard.out (No such
> file or directory)
> error: command 'c++' failed with exit status 1
>> > collect2: ld returned 1 exit status
>>
>> It doesn't tell which arch it's missing. I'm a bit confused about
>> this "missing architecture". What arch does your system have?
>>
> My architecture is an Intel Core 2 Duo 2 GHz (64-bit).
This is important. I recently had a similar issue (sort of). I think
the macports library is 32-bit only, and I know that at least for
building Python the build performs 64-bit only by default (this was my
issue) on a 64bit system. Of course, in case you want to make a 64bit
build against a 32bit library the error would be sensible.
To check this, try to run:
$ file /opt/local/lib/libxml2.2.dylib
When I run it on the Apple supplied file it gives:
/usr/lib/libxml2.dylib: Mach-O universal binary with 3 architectures
/usr/lib/libxml2.dylib (for architecture x86_64):	Mach-O 64-bit
dynamically linked shared library x86_64
/usr/lib/libxml2.dylib (for architecture i386):	Mach-O dynamically
linked shared library i386
/usr/lib/libxml2.dylib (for architecture ppc7400):	Mach-O dynamically
linked shared library ppc
Maybe we can track it down that way.
> Sorry for my delayed response - I am currently on travel... but I hope this
> is fixable. If nothing else comes to mind, I will try installing Python 2.6
> from source with the option you mentioned?
I hope you had some patience ... I was sick :-(
And now, as you have choosen the make.osx way, we stick to that. I'll
try to learn it ... :-)
The --enable-framework switch is only important when you want Python
to be installed in /Library/Frameworks/Python.framework . Otherwise
it will install in the normal unix path. I think the python.org
installer installs as a framework, although I'm not completely sure,
and would welcome correction if I'm wrong.
Friedrich
From: Benjamin R. <ben...@ou...> - 2010年07月17日 18:22:40
On Sat, Jul 17, 2010 at 12:46 PM, Benjamin Root <ben...@ou...> wrote:
> On Sat, Jul 17, 2010 at 6:14 AM, Pavlo Shchelokovskyy <
> shc...@gm...> wrote:
>
>> Hi all,
>> on my workplace I use matplotlib in restricted Windows environment.
>> Since couple of versions matplotlib Windows installer needs elevated
>> user privileges to work (why?), but installation from Python eggs was
>> working just fine. However I can not find any eggs for latest
>> matplotlib, and those on PyPI are for previous release, i.e. 0.99.3.
>> So can somebody point me to Python eggs for matplotlib on Python 2.6
>> under Windows? Or how can I build one, for example from working
>> installation of matplotlib 1.0.0 on the identical platform?
>>
>> Best regards,
>> Pavlo Shchelokovskyy
>>
>>
> I haven't tried matplotlib on Windows, but on Linux, we are able to install
> the various SciPy packages locally by using "python setupegg.py install
> --local". This does require the use of a build environment, though. I
> don't know if there is an equivalent for Windows, but I wouldn't be
> surprised if there was.
>
> Ben Root
>
>
Correction -- "python setupegg.py install --user"
Sorry for the confusion.
Ben Root
From: Benjamin R. <ben...@ou...> - 2010年07月17日 17:46:44
On Sat, Jul 17, 2010 at 6:14 AM, Pavlo Shchelokovskyy <
shc...@gm...> wrote:
> Hi all,
> on my workplace I use matplotlib in restricted Windows environment.
> Since couple of versions matplotlib Windows installer needs elevated
> user privileges to work (why?), but installation from Python eggs was
> working just fine. However I can not find any eggs for latest
> matplotlib, and those on PyPI are for previous release, i.e. 0.99.3.
> So can somebody point me to Python eggs for matplotlib on Python 2.6
> under Windows? Or how can I build one, for example from working
> installation of matplotlib 1.0.0 on the identical platform?
>
> Best regards,
> Pavlo Shchelokovskyy
>
>
I haven't tried matplotlib on Windows, but on Linux, we are able to install
the various SciPy packages locally by using "python setupegg.py install
--local". This does require the use of a build environment, though. I
don't know if there is an equivalent for Windows, but I wouldn't be
surprised if there was.
Ben Root
From: Pavlo S. <shc...@gm...> - 2010年07月17日 11:14:47
Hi all,
on my workplace I use matplotlib in restricted Windows environment.
Since couple of versions matplotlib Windows installer needs elevated
user privileges to work (why?), but installation from Python eggs was
working just fine. However I can not find any eggs for latest
matplotlib, and those on PyPI are for previous release, i.e. 0.99.3.
So can somebody point me to Python eggs for matplotlib on Python 2.6
under Windows? Or how can I build one, for example from working
installation of matplotlib 1.0.0 on the identical platform?
Best regards,
Pavlo Shchelokovskyy
From: Jae-Joon L. <lee...@gm...> - 2010年07月17日 07:41:24
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/v1_0_maint/lib/matplotlib/text.py?r1=8512&r2=8541&pathrev=8541
Regards,
-JJ
On Wed, Jul 14, 2010 at 1:22 AM, shuwj <shu...@16...> wrote:
> Hi JJ,
>  Thanks for your reply. I can't access the svn for some network
> reason. Will you please send me a copy of your patch about Text.draw?
>  Regards,
>
> David.shu
>
>
>
>
>> It seems that there are at least two issues related with the text
>>clipping.
>> The first issue is that the Text.draw method does not properly set
>> clip path. I think I fixed this in r8541 and r8542.
>>
>> The second issue is that the agg backend does not seem to support a
>> clip path yet for the text.
>>
>> Also, your script need to be fixed.
>> The patch need to be added to the axes (or its transform need to be
>> set) before you call set_clip_path.
>>
>> So, with the current svn, you can clip the text with an arbitrary path
>> when you're using the backends that support it (I only tested with pdf
>> backend, the attached is the pdf output converted to png).
>> If you can install matplotlib from the svn, please test the patch.
>> Also, it would be great if you file a bug in the SF tracker, so that
>> other developer can fix it later.
>>
>> Regards,
>>
>> -JJ
>
>
>
>
From: Jae-Joon L. <lee...@gm...> - 2010年07月17日 07:18:35
I presume that you're using matploltib v1.0?
It seems that the bug was recently introduced as the baseline of the
multiline text has been recently changed.
This should be fixed this in r8564, and r8565.
Unfortunately, I don't see any easy workaround other than changing the
vertical alignment of multiline text as you suggested (but the code
will produce erroneous baseline with the fixed matplotlib).
Regards,
-JJ
On Fri, Jul 16, 2010 at 9:17 AM, Bartosz Telenczuk
<b.t...@bi...> wrote:
> Hi all,
>
> I am trying to create legend with multiple-line labels, but I noticed that the labels are not properly aligned. I tried also changing the alignment of the text objects to center, but this requires separate handling of multi-line and single-line labels:
>
> import matplotlib.pyplot as plt
> plt.plot([1,2,3], label"multi\nline 1")
> plt.plot([1,2,3], label="multi\nline 1")
> plt.plot([1,2,3], label="multi\nline 2")
> plt.plot([1,2,3], label=" single line")
> leg=plt.legend()
> #change alignment of multiline labels only
> plt.setp(leg.get_texts()[:2], va='center')
>
> I found a discussion thread on this topic:
>
> http://article.gmane.org/gmane.comp.python.matplotlib.devel/6116
>
> Is there a way to achieve a clean rendering independent of number of lines?
>
> Yours,
>
> Bartosz
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

Showing 12 results of 12

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