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






Showing 22 results of 22

From: Paolo C. <pao...@un...> - 2008年11月06日 22:39:18
Hello,
I have a problem I tried to solve in any way,a nd couldn't.
I want to plot an Edgeworth Box with matplotlib.
To do so, I need to create a plot with origin on the north-east corner with 
axes scales going "the wrong way". For an idea of how an EB works, see:
http://en.wikipedia.org/wiki/Image:Contract-curve-on-edgeworth-box.svg
I noticed that 
axis([1,0,1,0])
allows me to make the scale go backwards from 1 to 0.
I just need a way to put the origin on the upper-right corner. I couldn't find 
one, I could just set the origin up-left (north-west), bot not up-right 
(north-east).
Any help would be highly appreciated.
Thanks for the great app.
Paolo
From: Paolo C. <pao...@un...> - 2008年11月06日 22:35:55
Hello,
I have a problem I tried to solve in any way,a nd couldn't.
I want to plot an Edgeworth Box with matplotlib.
To do so, I need to create a plot with origin on the north-east corner with 
axes scales going "the wrong way". For an idea of how an EB works, see:
http://en.wikipedia.org/wiki/Image:Contract-curve-on-edgeworth-box.svg
I noticed that 
axis([1,0,1,0])
allows me to make the scale go backwards from 1 to 0.
I just need a way to put the origin on the upper-right corner. I couldn't find 
one, I could just set the origin up-left (north-west), bot not up-right 
(north-east).
Any help would be highly appreciated.
Thanks for the great app.
Paolo
From: Darren D. <dar...@co...> - 2008年11月06日 22:28:49
On Thursday 06 November 2008 03:58:08 pm John Hunter wrote:
> On Thu, Nov 6, 2008 at 11:28 AM, KURT PETERS <pet...@ms...> wrote:
> > I recently tried to install for python 2.6 and got an error that the dll
> > is incompatible. Is there a version for 2.6? I didn't see one here:
>
> No, we haven't released any binaries for 2.6. It is probably getting
> to be time to release a new version of mpl, especially since 2.6 has
> been out for a while and lots of new fixes have gone into mpl since
> our last major release.
>
> Charlie, what is your availability? We would need to wait until at
> least next week so we could do a feature freeze and a last round of
> fixes. What say you other developers -- any major holdups? And
> should we stop doing binary builds for python 2.4 according to our
> unofficial policy of supporting the most recent two python releases?
Stan West checked out my subprocess patch on windows with python-2.5, which 
should take care of a bunch of deprecation warnings. I need to double check 
that I got them all, maybe I can get to it this weekend.
I'm in favor of dropping support for python-2.4, but on the other hand I think 
the most recent version of RHEL still uses this version.
From: Ben G. (FOSS) <bg...@gm...> - 2008年11月06日 21:06:47
Attachments: test.py
Hey all,
I've come across quite a problem while using pylab in a recent project.
It seems that the second time I call axvspan or axvline, the view limits
are reset (seemingly arbitrarily). I have attached a code sample
(derived from my project) to demonstrate this issue. The code sample
opens a figure with a single line and vline, adding another set with
every key press. You will see that when the figure is initially plotted,
the view limits are correct for the dataset, however as the second
line/vline is plotted, the limits are stretched. It seems that this must
be a bug in matplotlib. Any help or input anyone could offer would be
greatly appreciated. Thanks,
- Ben
From: Jeff W. <js...@fa...> - 2008年11月06日 21:05:23
John Hunter wrote:
> On Thu, Nov 6, 2008 at 11:28 AM, KURT PETERS <pet...@ms...> wrote:
> 
>> I recently tried to install for python 2.6 and got an error that the dll is
>> incompatible. Is there a version for 2.6? I didn't see one here:
>> 
>
> No, we haven't released any binaries for 2.6. It is probably getting
> to be time to release a new version of mpl, especially since 2.6 has
> been out for a while and lots of new fixes have gone into mpl since
> our last major release.
>
> Charlie, what is your availability? We would need to wait until at
> least next week so we could do a feature freeze and a last round of
> fixes. What say you other developers -- any major holdups? And
> should we stop doing binary builds for python 2.4 according to our
> unofficial policy of supporting the most recent two python releases?
>
> JDH
> 
John: I think we have to wait till there is a binary numpy windows 
installer available for Python 2.6, which won't happen till version 1.3 
is released.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: John H. <jd...@gm...> - 2008年11月06日 20:58:20
On Thu, Nov 6, 2008 at 11:28 AM, KURT PETERS <pet...@ms...> wrote:
> I recently tried to install for python 2.6 and got an error that the dll is
> incompatible. Is there a version for 2.6? I didn't see one here:
No, we haven't released any binaries for 2.6. It is probably getting
to be time to release a new version of mpl, especially since 2.6 has
been out for a while and lots of new fixes have gone into mpl since
our last major release.
Charlie, what is your availability? We would need to wait until at
least next week so we could do a feature freeze and a last round of
fixes. What say you other developers -- any major holdups? And
should we stop doing binary builds for python 2.4 according to our
unofficial policy of supporting the most recent two python releases?
JDH
From: Michael D. <md...@st...> - 2008年11月06日 20:55:02
There hasn't been a release of matplotlib since Python 2.6 was released, 
and in general, Python packages only work with a specific version of Python.
You can build yourself from SVN (which has some minor fixes for 
Python-2.6 compatibility), or wait until the next binary release. I 
haven't heard any plans for one lately, and I'm not the Windows release 
manager, so I don't know what's involved in getting a Python 2.6 build out.
Cheers,
Mike
KURT PETERS wrote:
> I recently tried to install for python 2.6 and got an error that the dll is 
> incompatible. Is there a version for 2.6? I didn't see one here:
> http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194&release_id=608758
> Kurt
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: KURT P. <pet...@ms...> - 2008年11月06日 17:28:12
I recently tried to install for python 2.6 and got an error that the dll is 
incompatible. Is there a version for 2.6? I didn't see one here:
http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194&release_id=608758
Kurt
From: John H. <jd...@gm...> - 2008年11月06日 17:26:27
On Thu, Nov 6, 2008 at 9:00 AM, Nils Wagner
<nw...@ia...> wrote:
> Hi all,
>
> Is it possible to combine jpegs with matplotlib or PIL ?
>
> Any pointer would be appreciated.
if you have PIL installed, you can load them into mpl with imread, and
then set the alpha channel to make one partially transparent, and then
overlay them as in the layer images example
 http://matplotlib.sourceforge.net/examples/pylab_examples/layer_images.html
Below is some example code that loads a jog into RGB data, and then
embeds it in RGBA with an alpha mask of 0.5. Note however, that mpl
is not a general image processing library, so you will probably have
better luck with PIL. I'm no PIL expert, so can't help there...
In [8]: from matplotlib.image import imread
In [9]: im = imread('lena.jpg')
In [10]: im.shape
Out[10]: (512, 512, 3)
In [12]: import numpy as np
In [13]: rgba = np.zeros((512,512,4))
In [14]: im.dtype
Out[14]: dtype('uint8')
In [15]: im = im.astype(float)/255.
In [17]: rgba[:,:,:3] = im
In [18]: rgba[:,:,-1] = 0.5
From: Christopher B. <Chr...@no...> - 2008年11月06日 17:19:17
Nils Wagner wrote:
>>> I tried to read a jpg file.
>>> How can fix the following problem ?
> Centos4.6 (Linux)
> libjpeg.rpm is installed.
How do did you build/install PIL? It may not have found libjpeg when it 
was built, in which case it wouldn't support jpegs.
> Is it possible to combine jpegs with matplotlib or PIL ?
I don't know what you mean by "combine", but PILL can probably do it, 
once you get jpeg support working.
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Stan W. <sta...@nr...> - 2008年11月06日 16:18:44
From: Mark Bakker [mailto:ma...@gm...] 
Sent: Thursday, November 06, 2008 10:48
Thanks Stan.
I read the docs (which are quite nice), but couldn't find a way to set the
ticks after the fact.
But your method worked,
Mark
It seems to me that setting the ticks after the fact is more difficult, but
the following appears to work:
import matplotlib as mpl
 
b.locator = mpl.ticker.FixedLocator([0, 5, 10])
b.draw_all() # recalculate the colorbar
draw()
Stan
From: Mark B. <ma...@gm...> - 2008年11月06日 15:47:55
Thanks Stan.
I read the docs (which are quite nice), but couldn't find a way to set the
ticks after the fact.
But your method worked,
Mark
On Wed, Nov 5, 2008 at 4:00 PM, Stan West <sta...@nr...> wrote:
> *From:* Mark Bakker [mailto:ma...@gm...]
> *Sent:* Wednesday, November 05, 2008 06:25
> Hello list -
>
> I am trying to change the yticks on my colorbar (in combination with
> contourf) and cannot figure out how to do it.
>
> Short example:
>
> x,y = meshgrid(linspace(0,10),linspace(0,10))
> a = contourf(x,y,x,linspace(0,10,6))
> b = colorbar(a)
>
> This gives a nice colorbar, with ticks at 0,2,4,6,8,10
>
> But I want labels only at 0,5,10. So I thought I can change that as:
>
> b.ax.set_yticks([0,5,10])
> draw()
>
> But this gives really wacky results (totally messes up the colorbar), so
> that doesn't seem to be the way to do it.
>
> Can anybody tell me the correct way to do it?
>
> Thanks, Mark
>
> Try
>
> b = colorbar(a, ticks=linspace(0, 10, 3))
>
> Documentation is at
> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.colorbar
> .
>
From: Michael D. <md...@st...> - 2008年11月06日 15:45:16
Why are you turning autoscaling off and on? When you turn it off, the 
autoscale mechanism effectively "ignores" any plots until you turn it 
back on. If you remove
gca().set_autoscale_on(False)
all seems to work fine.
Is your question that you want to autoscale to a plot after creating it?
Mike
par...@fr... wrote:
> Hi everybody,
>
> I have a problem with my application using Tkinter.
>
> To simplify, here follows a small program showing the encountered problem:
>
> ################
> from pylab import *
>
> a = arange( 10 )
>
> plot( 0.5*a, cos(a) )
>
> gca().set_autoscale_on(False)
>
> plot( a, cos(a), 'r' )
> gca().set_autoscale_on(True)
> show()
> ################
>
> At this time, the problem is that by clicking on the "house" (first button in
> the pylab toolbar), it is impossible to get the two curves completely,
> whereas the "pan/zoom mode" (the cross button) shows that the red curve has
> been drawn completely.
>
> Is there a function to obtain a "true" autoscale, i.e. that looks at all data
> on the plot, and computes the best view?
>
> Thanks a lot
>
> Julien
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: <par...@fr...> - 2008年11月06日 15:35:54
Hi everybody,
I have a problem with my application using Tkinter.
To simplify, here follows a small program showing the encountered problem:
################
from pylab import *
a = arange( 10 )
plot( 0.5*a, cos(a) )
gca().set_autoscale_on(False)
plot( a, cos(a), 'r' )
gca().set_autoscale_on(True)
show()
################
At this time, the problem is that by clicking on the "house" (first button in
the pylab toolbar), it is impossible to get the two curves completely,
whereas the "pan/zoom mode" (the cross button) shows that the red curve has
been drawn completely.
Is there a function to obtain a "true" autoscale, i.e. that looks at all data
on the plot, and computes the best view?
Thanks a lot
Julien
From: Nils W. <nw...@ia...> - 2008年11月06日 15:15:57
Hi all,
Is it possible to combine jpegs with matplotlib or PIL ?
Any pointer would be appreciated.
 Nils
From: Ryan M. <rm...@gm...> - 2008年11月06日 14:49:49
oliver marks wrote:
> hi,
> 
> I have successfully written my first test program in matlab, it works
> perfectly except the display is not quite right, to the left and write
> of the plotted data there are blank areas with nothing on, how can i get
> rid of these a link to the image is attached, and the code is below.
> 
I don't think it's anything you're doing wrong, it's just that
matplotlib leaves some space by default. What you want it the
pylab.subplots_adjust function:
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.subplots_adjust
You might want to try something like (the numbers are in normalized
figure coordinates, such that 0 is very left/bottom and 1.0 is the very
right/top):
pylab.subplots_adjust(left=0.05, right=0.95)
Putting this right after your call to pylab.figure() works for me.
You can override the default in you matplotlibrc file as well, if you wish.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: oliver m. <oli...@ho...> - 2008年11月06日 13:36:44
hi,
I have successfully written my first test program in matlab, it works
perfectly except the display is not quite right, to the left and write
of the plotted data there are blank areas with nothing on, how can i get
rid of these a link to the image is attached, and the code is below.
hope someone can tell me what i am doing wrong.
http://imagebin.ca/view/dYSphQ.html
import dateutil
import datetime
class graph:
 def __init__(self):
 pass
 
 def data(self):
 pass
 
 def line_graph(self,path):
 return "matplotlib not installed, graph not displayed."
 
 def bar_graph(self,path):
 return "matplotlib not installed, graph not displayed."
try:
 import matplotlib
 matplotlib.use("agg")
 import numpy as np
 import matplotlib.pyplot as plt
 import pylab
 from matplotlib.dates import MonthLocator, WeekdayLocator 
 
 class graph:
 def __init__(self):
 self.xaxis=[]
 self.yaxis=[]
 self.values=[]
 self.fig=pylab.figure() 
 
 def data(self,data):
 self.values=data
 
 def labels(self):
 pass
 def xaxis_dates(self,dates,format="%d/%m/%Y"):
 dtlist=[datetime.datetime.strptime(s, format) for s in
dates]
 self.xaxis=pylab.date2num(dtlist)
 ax = self.fig.add_subplot(111) 
 days = WeekdayLocator() # every year
 months = MonthLocator() # every month
 ax.xaxis.set_major_locator(months)
 #ax.xaxis.set_minor_locator(days)
 
 def line_graph(self):
 plt.plot_date(self.xaxis,self.values,visible=True,
linestyle='-')
 
 def bar_graph(self):
 plt.bar(self.xaxis,self.values)
 #plt.bar(self.xaxis,self.values,label=r)
 
 def make(self,fname):
 plt.savefig(fname)
 htmout="<img src=\""+fname+"\">"
 return htmout
 
#matplotlib not installed rather than fall over create a dummy class, as
we do not want to rely on graphing,
#non essential feature
except ImportError, e:
 class graph:
 def __init__(self):
 self.xaxis=[]
 self.yaxis=[]
 self.data=[]
 
 def data(self,data):
 pass
 
 def line_graph(self,path):
 return "matplotlib not installed, graph not displayed."
 
 def bar_graph(self,path):
 return "matplotlib not installed, graph not displayed."
 def make(self):
 plt.plot_date(da,d,visible=True, linestyle='-')
 plt.savefig("graph.png")
 
dates=['01/10/2008', '02/10/2008', '03/10/2008', '04/10/2008',
'05/10/2008', '06/10/2008', '07/10/2008', '08/10/2008', '09/10/2008',
'10/10/2008', '11/10/2008', '12/10/2008', '13/10/2008', '14/10/2008',
'15/10/2008', '16/10/2008', '17/10/2008', '18/10/2008', '19/10/2008',
'20/10/2008', '21/10/2008', '22/10/2008', '23/10/2008', '24/10/2008',
'25/10/2008', '26/10/2008', '27/10/2008', '28/10/2008', '29/10/2008']
data=(73, 76, 58, 0, 0, 105, 138, 98, 64, 42, 0, 0, 100, 115, 97, 69,
153, 1, 0, 84, 122, 131, 77, 97, 0, 0, 117, 99, 101)
g=graph()
g.xaxis_dates(dates)
g.data(data)
g.line_graph()
g.make("test.png")
g=graph()
g.xaxis_dates(dates)
g.data(data)
g.bar_graph()
g.make("testbar.png")
#dates=[datetime.datetime.strptime(s, "%d/%m/%Y") for s in r]
#print r
#print dates
#d=(73, 76, 58, 0, 0, 105, 138, 98, 64, 42, 0, 0, 100, 115, 97, 69, 153,
1, 0, 84, 122, 131, 77, 97, 0, 0, 117, 99, 101)
#d=(100,150)
#days = MonthLocator() # every year
#months = MonthLocator() # every month
#yearsFmt = DateFormatter('%Y')
#fig = pylab.figure() 
#ax = fig.add_subplot(111) 
#labels = ax.get_xticklabels()
#pylab.setp(labels,'rotation','vertical')
#days = MonthLocator() # every year
#months = MonthLocator() # every month
#ax.xaxis.set_major_locator(months)
#ax.xaxis.set_major_formatter(yearsFmt)
#ax.xaxis.set_minor_locator(days)
#da=pylab.date2num(dates)
#plt.plot_date(da,d,visible=True, linestyle='-')
#plt.bar(da,d,label=r)
#plt.savefig("graph.png")
CONFIDENTIALITY NOTICE:
The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual(s) to whom it is addressed and others authorised to receive it. If you are not the intended recipient you are hereby notified that any disclosure, copying, distribution or action taken in relation to the contents of this information is strictly prohibited and may be unlawful. Neither the sender nor HoMedics Group Ltd is liable for the correct and complete transmission of the contents of an email, or for its timely receipt. If you receive this communication in error, please destroy it and notify HoMedics Group Ltd immediately on +44 (0)1732 354828. Company No. 4353765, Registered Address: HoMedics House, Somerhill Business Park, Five Oak Green Road, Tonbridge, Kent, TN11 0GP.
From: Nils W. <nw...@ia...> - 2008年11月06日 12:36:43
On 2008年11月06日 13:28:21 +0100
 Gregor Thalhammer <gre...@gm...> wrote:
> Nils Wagner schrieb:
>> Hi all,
>>
>> I tried to read a jpg file.
>> How can fix the following problem ?
>>
>> 
> Which operating system are you using?
> The problem arise in the PIL (Python Imaging Library). 
>It cannot find the libjpeg library (you have it installed 
>on your system?). Try to install libjpeg and properly 
>configure/install PIL.
> 
> Gregor
 
Centos4.6 (Linux)
libjpeg.rpm is installed.
rpm -ql libjpeg
/usr/bin/cjpeg
/usr/bin/djpeg
/usr/bin/jpegtran
/usr/bin/rdjpgcom
/usr/bin/wrjpgcom
/usr/lib/libjpeg.so.62
/usr/lib/libjpeg.so.62.0.0
/usr/share/doc/libjpeg-6b
/usr/share/doc/libjpeg-6b/README
/usr/share/doc/libjpeg-6b/usage.doc
/usr/share/man/man1/cjpeg.1.gz
/usr/share/man/man1/djpeg.1.gz
/usr/share/man/man1/jpegtran.1.gz
/usr/share/man/man1/rdjpgcom.1.gz
/usr/share/man/man1/wrjpgcom.1.gz
/usr/bin/cjpeg
/usr/bin/djpeg
/usr/bin/jpegtran
/usr/bin/rdjpgcom
/usr/bin/wrjpgcom
/usr/lib64/libjpeg.so.62
/usr/lib64/libjpeg.so.62.0.0
/usr/share/doc/libjpeg-6b
/usr/share/doc/libjpeg-6b/README
/usr/share/doc/libjpeg-6b/usage.doc
/usr/share/man/man1/cjpeg.1.gz
/usr/share/man/man1/djpeg.1.gz
/usr/share/man/man1/jpegtran.1.gz
/usr/share/man/man1/rdjpgcom.1.gz
/usr/share/man/man1/wrjpgcom.1.gz
Any idea ?
Nils
From: Gregor T. <gre...@gm...> - 2008年11月06日 12:28:38
Nils Wagner schrieb:
> Hi all,
>
> I tried to read a jpg file.
> How can fix the following problem ?
>
> 
Which operating system are you using?
The problem arise in the PIL (Python Imaging Library). It cannot find 
the libjpeg library (you have it installed on your system?). Try to 
install libjpeg and properly configure/install PIL.
Gregor
From: Nils W. <nw...@ia...> - 2008年11月06日 12:09:28
Hi all,
I tried to read a jpg file.
How can fix the following problem ?
File "test.py", line 15, in <module>
 im = imshow(lena, origin='lower')
 File 
"/data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/pyplot.py", 
line 1915, in imshow
 ret = gca().imshow(*args, **kwargs)
 File 
"/data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/axes.py", 
line 5498, in imshow
 im.set_data(X)
 File 
"/data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/image.py", 
line 282, in set_data
 self._A = pil_to_array(A)
 File 
"/data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/image.py", 
line 751, in pil_to_array
 x = toarray(im)
 File 
"/data/home/nwagner/local/lib/python2.5/site-packages/matplotlib/image.py", 
line 736, in toarray
 x_str = im.tostring('raw',im.mode,0,-1)
 File 
"/data/home/nwagner/local/lib/python2.5/site-packages/PIL/Image.py", 
line 513, in tostring
 self.load()
 File 
"/data/home/nwagner/local/lib/python2.5/site-packages/PIL/ImageFile.py", 
line 180, in load
 d = Image._getdecoder(self.mode, d, a, 
self.decoderconfig)
 File 
"/data/home/nwagner/local/lib/python2.5/site-packages/PIL/Image.py", 
line 375, in _getdecoder
 raise IOError("decoder %s not available" % 
decoder_name)
IOError: decoder jpeg not available
 
Is it possible to plot different jpg's in subplots ?
Nils
From: sordnay <so...@gm...> - 2008年11月06日 10:37:26
Thanks for your answer Gregor,
I'm using TkAgg backend, I hope is also that simple there!
Gregor Thalhammer-2 wrote:
> 
> This depends on the backend/GUI toolkit you use. If you use wx, a simple 
> approach might be the following:
> 
> ------------------
> from pylab import *
> import wx
> 
> def Action(event):
> print "you pressed me!"
> 
> fig = figure()
> toolbar = fig.canvas.toolbar
> 
> ID_MY_ACTION = wx.NewId()
> toolbar.AddLabelTool(ID_MY_ACTION,
> 'Autoscale',
> wx.Bitmap('autoscale.png', wx.BITMAP_TYPE_PNG)
> )
> toolbar.Realize()
> 
> toolbar.Bind(wx.EVT_TOOL, Action)
> 
> show()
> --------------------
> 
> Gregor
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://www.nabble.com/How-to-insert-a-new-button--tp20348834p20358744.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Gregor T. <gre...@gm...> - 2008年11月06日 09:49:39
sordnay schrieb:
> Hi
> I would like to insert a new button on the standard figure toolbar, 
> is there an easy way? maybe someone can post an example
This depends on the backend/GUI toolkit you use. If you use wx, a simple 
approach might be the following:
------------------
from pylab import *
import wx
def Action(event):
 print "you pressed me!"
fig = figure()
toolbar = fig.canvas.toolbar
ID_MY_ACTION = wx.NewId()
toolbar.AddLabelTool(ID_MY_ACTION,
 'Autoscale',
 wx.Bitmap('autoscale.png', wx.BITMAP_TYPE_PNG)
 )
toolbar.Realize()
toolbar.Bind(wx.EVT_TOOL, Action)
show()
--------------------
Gregor

Showing 22 results of 22

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