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


Showing results of 412

<< < 1 .. 12 13 14 15 16 17 > >> (Page 14 of 17)
From: Aman T. <ama...@gm...> - 2010年09月10日 17:46:28
If you're just looking for points, you can use ax.scatter(). It will plot
the points. Also, make sure you set the zorder keyword argument in the
scatter.
Example:
x=range(10)
y=range(10)
z=range(10,20)
ax.scatter(x,y,c=z,zorder=10)
Hope this helps,
Aman
On Fri, Sep 10, 2010 at 1:06 PM, izzybitsie <is...@ju...> wrote:
>
> Hi,
> I'm new to matplotlib and I'm looking for an easy way to plot geographical
> data on a background map: bkgmap.png
> http://old.nabble.com/file/p29679002/bkgmap.png
> So far I only found out about warpimage() to do this but only part of
> bkgmap.png comes up in the output image. I think this is because this
> image
> has no pixels covering all the world.
> http://old.nabble.com/file/p29679002/partialbkg_polygon.png
>
> Any idea on how to insert this image as background?
> THANKS
>
> Code: the polygon displays in right position even though background doesn't
> show OK (tested with map,lat/lon lines drawn too)
>
> import sys
> import Image, ImageDraw # PIL
> from matplotlib.patches import Polygon
> from mpl_toolkits.basemap import Basemap
> import matplotlib.image as mpimg
> import matplotlib.pyplot as plt
> import numpy as np
>
> lat0=48
> lon0=13
> lllon=-15
> lllat=20
> urlon=73
> urlat=57
> map =
>
> Basemap(projection='stere',lat_0=lat0,lon_0=lon0,llcrnrlon=lllon,llcrnrlat=lllat,urcrnrlon=urlon,urcrnrlat=urlat,
> resolution='c',area_thresh=1000.)
> map.warpimage(image='bkgmap.png',scale=None,ax=plt.gca())
> # points
> lat = [50.,55.,45.,40.,50.]
> lon = [-20.,-10.,10.,-10.,-20.]
> x0,y0 = map(lon[0],lat[0])
> x1,y1 = map(lon[1],lat[1])
> x2,y2 = map(lon[2],lat[2])
> x3,y3 = map(lon[3],lat[3])
> x4,y4 = map(lon[4],lat[4])
>
> plt.gca().add_patch(Polygon([(x0,y0),(x1,y1),(x2,y2),(x3,y3),(x4,y4)],fill=1,facecolor='red',edgecolor='black'))
> plt.show()
> --
> View this message in context:
> http://old.nabble.com/matplotlib-basemap-plot-geo-data-on-background-map-tp29679002p29679002.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-- 
Aman Thakral
B.Eng & Biosci, M.Eng Design
From: izzybitsie <is...@ju...> - 2010年09月10日 17:06:50
Hi,
I'm new to matplotlib and I'm looking for an easy way to plot geographical
data on a background map: bkgmap.png
http://old.nabble.com/file/p29679002/bkgmap.png 
So far I only found out about warpimage() to do this but only part of
bkgmap.png comes up in the output image. I think this is because this image
has no pixels covering all the world.
http://old.nabble.com/file/p29679002/partialbkg_polygon.png 
Any idea on how to insert this image as background? 
THANKS
Code: the polygon displays in right position even though background doesn't
show OK (tested with map,lat/lon lines drawn too) 
import sys
import Image, ImageDraw # PIL
from matplotlib.patches import Polygon
from mpl_toolkits.basemap import Basemap
import matplotlib.image as mpimg
import matplotlib.pyplot as plt
import numpy as np
 
lat0=48
lon0=13
lllon=-15
lllat=20
urlon=73
urlat=57
map =
Basemap(projection='stere',lat_0=lat0,lon_0=lon0,llcrnrlon=lllon,llcrnrlat=lllat,urcrnrlon=urlon,urcrnrlat=urlat,
 resolution='c',area_thresh=1000.)
map.warpimage(image='bkgmap.png',scale=None,ax=plt.gca())
# points
lat = [50.,55.,45.,40.,50.]
lon = [-20.,-10.,10.,-10.,-20.]
x0,y0 = map(lon[0],lat[0]) 
x1,y1 = map(lon[1],lat[1]) 
x2,y2 = map(lon[2],lat[2]) 
x3,y3 = map(lon[3],lat[3]) 
x4,y4 = map(lon[4],lat[4]) 
plt.gca().add_patch(Polygon([(x0,y0),(x1,y1),(x2,y2),(x3,y3),(x4,y4)],fill=1,facecolor='red',edgecolor='black'))
plt.show()
-- 
View this message in context: http://old.nabble.com/matplotlib-basemap-plot-geo-data-on-background-map-tp29679002p29679002.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Ted K. <ted...@gm...> - 2010年09月10日 16:33:02
Hi Tony
Thanks. Works perfectly!
Ted
On 10 September 2010 15:54, Tony S Yu <ts...@gm...> wrote:
>
> On Sep 10, 2010, at 10:42 AM, Ted Kord wrote:
>
> > Hi
> >
> > How can I:
> >
> > 1. make the frame of the plot thicker and
> > 2. remove the top and right of the frame.
> >
> > Thanks
> >
> > Ted
>
> There are probably a number of ways to do this (partly because spines are
> relatively new). Here's one possibility:
>
> import matplotlib.pyplot as plt
>
> f, ax = plt.subplots()
> ax.plot([0, 1])
> ax.spines['right'].set_visible(False)
> ax.spines['top'].set_visible(False)
> ax.xaxis.set_ticks_position('bottom')
> ax.yaxis.set_ticks_position('left')
> ax.spines['bottom'].set_linewidth(3)
> ax.spines['left'].set_linewidth(3)
> plt.show()
>
> Best,
> -Tony
>
>
From: Tony S Yu <ts...@gm...> - 2010年09月10日 14:55:07
On Sep 10, 2010, at 10:42 AM, Ted Kord wrote:
> Hi
> 
> How can I:
> 
> 1. make the frame of the plot thicker and
> 2. remove the top and right of the frame.
> 
> Thanks
> 
> Ted
There are probably a number of ways to do this (partly because spines are relatively new). Here's one possibility:
import matplotlib.pyplot as plt
f, ax = plt.subplots()
ax.plot([0, 1])
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
ax.xaxis.set_ticks_position('bottom')
ax.yaxis.set_ticks_position('left')
ax.spines['bottom'].set_linewidth(3)
ax.spines['left'].set_linewidth(3)
plt.show()
Best,
-Tony
From: Ted K. <ted...@gm...> - 2010年09月10日 14:42:44
Hi
How can I:
1. make the frame of the plot thicker and
2. remove the top and right of the frame.
Thanks
Ted
From: Yannis H. <yan...@te...> - 2010年09月10日 14:36:25
Attachments: Yannis Haralambous.vcf
dear Matplotlib users,
I can't manage to install matplotlib correctly on MacOS X 10.6.4.
when I launch the DMG installer matplotlib-1.0.0-python.org-py2.6-macosx10.4.mpkg
I get an error message, that my volume does not contain "System Python 2.6".
I'm running a standard MacOS X 10.6.4 with python 2.6.1 running from /usr/bin
And I do have Python 2.6 installed in
/System/Library/Frameworks/Python.framework/Versions/2.6
Why does the installer doesn't sees it?
The reason I wanted to install matplotlib directly from DMG is that when I built it from source and then tried to use it, I got the error:
Traceback (most recent call last):
File "./herbscmd.py", line 163, in <module>
sys.exit(main(sys.argv))
File "./herbscmd.py", line 156, in main
from matplotlib.pylab import show,draw
File "/Library/Python/2.6/site-packages/matplotlib/pylab.py", line 216, in <module>
from matplotlib import mpl # pulls in most modules
File "/Library/Python/2.6/site-packages/matplotlib/mpl.py", line 2, in <module>
from matplotlib import axis
File "/Library/Python/2.6/site-packages/matplotlib/axis.py", line 10, in <module>
import matplotlib.font_manager as font_manager
File "/Library/Python/2.6/site-packages/matplotlib/font_manager.py", line 52, in <module>
from matplotlib import ft2font
ImportError: dlopen(/Library/Python/2.6/site-packages/matplotlib/ft2font.so, 2): Symbol not found: _FT_Attach_File
Referenced from: /Library/Python/2.6/site-packages/matplotlib/ft2font.so
Expected in: flat namespace
in /Library/Python/2.6/site-packages/matplotlib/ft2font.so
I noticed that many people had that same error (just google on _FT_Attach_File, you will see) but I couldn't find a solution anywhere. This is why I turned to DMG installation, but it doesn't seem to work either. Could anyone help?
Thanks in advance!
-- 
-------------------------------------------------------
Yannis Haralambous
Directeur d'études
Institut Télécom, Télécom Bretagne
Département Informatique
UMR CNRS 3192 Lab-STICC
Technopôle Brest Iroise
CS 83818, 29238 Brest Cedex 3, France
Tel: +33 2 29 00 14 27
Fax: +33 2 29 00 12 82
Email: yan...@te...
Internet: http://omega.enstb.org/yannis
ICBM address: 48°21'31.57"N 4°34'16.76"W
-------------------------------------------------------
...pour distinguer l'extérieur d'un aquarium,
mieux vaut n'être pas poisson
...the ball I threw while playing in the park
has not yet reached the ground
Es gab eine Zeit, wo ich nur ungern über Schubert sprechen,
nur Nächtens den Bäumen und Sternen von ihm vorerzählen mögen.
From: Benjamin R. <ben...@ou...> - 2010年09月10日 13:44:08
On Fri, Sep 10, 2010 at 4:27 AM, Nils Wagner
<nw...@ia...>wrote:
> Hi all,
>
> what is needed to save a figure when the size is given in
> pixels, i.e. 1024x772 ?
> The default is 800x600 pixels.
>
> from pylab import plot, savefig
> from numpy import sin,linspace,pi
> x = linspace(0,2*pi,200)
> plot(x,sin(x))
> savefig('test')
>
> Nils
>
>
Nils,
In matplotlib, you can specify a figure size in inches like so:
import matplotlib.pyplot as plt
from numpy import sin,linspace,pi
width_in = 10.0
width_px = 1024
height_px = 772
aspect = width_px / float(height_px)
height_in = width_in / aspect
dpi = width_px / width_in
x = linspace(0, 2*pi, 200)
fig = plt.figure(figsize=(width_in, height_in))
ax = fig.gca()
ax.plot(x, sin(x))
Then, when you save your figure, you can specify the "dots per inch" (dpi):
fig.savefig('test.png', dpi=dpi)
I hope this helps!
Ben Root
From: Tony S Yu <ts...@gm...> - 2010年09月10日 13:39:45
On Sep 10, 2010, at 5:27 AM, Nils Wagner wrote:
> Hi all,
> 
> what is needed to save a figure when the size is given in 
> pixels, i.e. 1024x772 ?
> The default is 800x600 pixels.
> 
> from pylab import plot, savefig
> from numpy import sin,linspace,pi
> x = linspace(0,2*pi,200)
> plot(x,sin(x))
> savefig('test')
> 
> Nils
You can try creating a figure with the correct aspect ratio and then setting a corresponding dpi when you save:
#---
import matplotlib.pyplot as plt
import numpy as np
plt.figure(figsize=(10.24, 7.72))
x = np.linspace(0,2*np.pi,200)
plt.plot(x, np.sin(x))
plt.savefig('test', dpi=100)
#---
I had mixed results with this: I would occasionally get figures that were one pixel smaller than desired.
Best,
-Tony
From: Benjamin R. <ben...@ou...> - 2010年09月10日 13:31:17
On Fri, Sep 10, 2010 at 4:44 AM, sa6113 <s.p...@gm...> wrote:
>
> when I want to show the plot canvas, it doesn't stay at all, note that I
> need
> to use "backendQtagg", I mean when I use "pylab" there is no problem in
> showing the plot canvas, what is the problem? please help me.
> I use this simple code:
> "
> from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as
> FigureCanvas
> from matplotlib.figure import Figure
>
> x = numarray.arange(10)
> y = numarray.arange(10)
> fig = Figure(figsize=(5, 5))
>
> axes = fig.add_subplot(111)
> axes.plot(x,y)
> canvas = FigureCanvas( fig)
> xlabel('sahar')
> canvas.show()
> "
> The plot just winks.
>
This is just a complete guess, but I wonder if you might be having
conflicting backends. Try adding this to the beginning of your code.
import matplotlib
matplotlib.use('QtAgg')
Also, I wonder if you should be using Qt4Agg?
Ben Root
From: sa6113 <s.p...@gm...> - 2010年09月10日 09:44:44
when I want to show the plot canvas, it doesn't stay at all, note that I need
to use "backendQtagg", I mean when I use "pylab" there is no problem in
showing the plot canvas, what is the problem? please help me.
I use this simple code:
"
from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as
FigureCanvas
from matplotlib.figure import Figure
x = numarray.arange(10)
y = numarray.arange(10)
fig = Figure(figsize=(5, 5))
axes = fig.add_subplot(111)
axes.plot(x,y)
canvas = FigureCanvas( fig)
xlabel('sahar')
canvas.show()
"
The plot just winks.
-- 
View this message in context: http://old.nabble.com/problem-in-showing-the-plot%21%21%21-tp29675128p29675128.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Nils W. <nw...@ia...> - 2010年09月10日 09:27:48
Hi all,
what is needed to save a figure when the size is given in 
pixels, i.e. 1024x772 ?
The default is 800x600 pixels.
from pylab import plot, savefig
from numpy import sin,linspace,pi
x = linspace(0,2*pi,200)
plot(x,sin(x))
savefig('test')
Nils
From: Philippe C. <phi...@gm...> - 2010年09月09日 19:01:00
thanks for the answer.
it's slow, but acceptable.
If it was possible to update it faster, that would have been better,
but it's ok.
I do not know if it's because of pyqt or not, but the
self.fig.canvas.draw() takes around 1s, and then, there is another
extra time before the plot actually get updated.
I mean, visually.
2010年9月8日 Philippe Crave <phi...@gm...>:
> ---------- Forwarded message ----------
> From: Eric Firing <ef...@ha...>
> Date: 2010年9月8日
> Subject: Re: [Matplotlib-users] draw after set_data
> To: mat...@li...
>
>
> On 09/07/2010 07:33 PM, Philippe Crave wrote:
>> hi,
>>
>> sorry to bring this up again.
>> style haven't found how to draw my plot faster than
>> self.fig.canvas.draw(), after a set_data()
>
> If you need to change the scale of the plot when you update the data,
> then I don't see any alternative to redoing the whole plot. If that is
> too slow, then mpl may simply be the wrong tool for the job. Parts of
> mpl have been nicely optimized for speed, but generating a large number
> of subplots is not among them. I don't expect this will change any time
> soon. The tick generation and labeling is the main time sink. If I
> generate 20 blank subplots, with default ticks and labels, each draw
> takes 420 ms on my machine. If I set all the ticks to the empty list,
> it drops to 34 ms.
>
> Eric
>
>>
>> thanks
>>
>> 2010年9月1日 Philippe Crave<phi...@gm...>:
>>> Hi,
>>>
>>> I use qt4 backend.
>>> I update some lines doing something like that:
>>>
>>>  def draw_curves(self, datas, x):
>>>    for y in datas:
>>>      self.lines[i].set_data(x, y)
>>>      min_y, max_y = self.min_max(y)
>>>      self.ax[i].axis((0, x[-1], min_y, max_y))
>>>      #self.ax[i].draw_artist(self.lines[i])
>>>      #self.fig.canvas.blit(self.ax[i].bbox)
>>>    self.fig.canvas.draw()
>>>
>>>
>>> the self.fig.canvas.draw() is very slow. (I have 20 subplot in that figure).
>>> I tried to use:
>>>      self.ax[i].draw_artist(self.lines[i])
>>>      self.fig.canvas.blit(self.ax[i].bbox)
>>> it's very fast. But it does not update the scale of the plot.
>>> and it does not remove the old datas.
>>>
>>> Can someone help me on that ?
>>> if I plot a sin(x) at first, I get it between 0 and 1. then, if I plot
>>> 2.sin(x), it does not update the zoom to 0-2
>>>
>>> thank you,
>>> Philippe
>>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net Dev2Dev email is sponsored by:
>>
>> Show off your parallel programming skills.
>> Enter the Intel(R) Threading Challenge 2010.
>> http://p.sf.net/sfu/intel-thread-sfd
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: sa6113 <s.p...@gm...> - 2010年09月09日 18:33:14
I want to use backendQtAgg inorder to imbed plot dialog into basic dialog
and by clicking the labels open plot option.
I couldn't use 'motion_notify_event' because the event only handles into
plot area not in canvas area!!!
anybody knows?
-- 
View this message in context: http://old.nabble.com/How-by-clicking-an-axes-label-open-a-dialog--tp29661031p29661031.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Tony S Yu <ts...@gm...> - 2010年09月09日 15:12:59
Attachments: slope_marker.py
On Sep 9, 2010, at 10:53 AM, Bernardo Rocha wrote:
> Hi everyone,
> 
> I would like to know if it is possible (I guess it is) and how can I do a plot such as the one in the attached figure?
> 
> Could someone help me with this? I know that this one was done in gnuplot, but I would like to use matplotlib.
> 
> Thanks in advance.
> Bernardo M. R.
Hi Bernardo,
I have some functions which I use to draw slope markers (attached). There are examples of how to use it in the if-main block at the bottom of the file. It should be simple enough to use and works for linear and log scales.
The functions have grown sort of organically, so they're not as polished as they could be. In particular, the handling of linear/log scales could be refactored (probably by making slope marker a subclass of Polygon). Anyway, I haven't gotten around to cleaning things up, but the functions are very usable as is.
Hope that helps,
-Tony
From: Andre Walker-L. <wal...@gm...> - 2010年09月08日 18:57:40
It may not be an MPL issue, but rather Snow Leopard.
I have a friend who had font troubles, but it was because Mac OSX 10.6 (Snow
Leopard) changed the way fonts are handled. He had a file in his home
directory (which he created on 10.5) which had some font specifications,
which he had to alter/remove to fix his trouble.
I can't remember any more details, but thought I would share in case this
helps.
Andre
On Wed, Sep 8, 2010 at 8:56 AM, Jeremy Conlin <jlc...@gm...> wrote:
> I have trouble getting any symbols or any super/sub scripts to work
> since I upgraded to 1.0 a few months ago. I always get a message
> saying that some font isn't found. This occurs whenever I try to put
> symbols, superscripts, or subscripts in a label, or when I use a log
> scale (because then it MPL has to use superscripts). I have tried
> changing my matplotlibrc file but haven't found any combination of
> settings that help.
>
> To illustrate the problem, I have included three files, one python
> file and the other the error as captured from the output as well as my
> matplotlibrc file. The python file is trivial:
>
> # -------------------------------------------------
> import matplotlib.pyplot as pyplot
>
> pyplot.plot([1,2,3], label='$\alpha > \beta$')
>
> pyplot.legend()
> pyplot.show()
> # -------------------------------------------------
>
> Can someone please help me figure out what is wrong? I'm on a Mac
> running 10.6, python 2.6, matplotlib 1.0, and I have TeX installed.
>
> Thanks,
> Jeremy
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Tony S Yu <ts...@gm...> - 2010年09月08日 18:45:49
On Sep 8, 2010, at 2:10 PM, Jeremy Conlin wrote:
> On Wed, Sep 8, 2010 at 10:42 AM, Tony S Yu <ts...@gm...> wrote:
>> 
>> On Sep 8, 2010, at 11:56 AM, Jeremy Conlin wrote:
>> 
>>> I have trouble getting any symbols or any super/sub scripts to work
>>> since I upgraded to 1.0 a few months ago. I always get a message
>>> saying that some font isn't found. This occurs whenever I try to put
>>> symbols, superscripts, or subscripts in a label, or when I use a log
>>> scale (because then it MPL has to use superscripts). I have tried
>>> changing my matplotlibrc file but haven't found any combination of
>>> settings that help.
>>> 
>>> To illustrate the problem, I have included three files, one python
>>> file and the other the error as captured from the output as well as my
>>> matplotlibrc file. The python file is trivial:
>>> 
>>> # -------------------------------------------------
>>> import matplotlib.pyplot as pyplot
>>> 
>>> pyplot.plot([1,2,3], label='$\alpha > \beta$')
>>> 
>>> pyplot.legend()
>>> pyplot.show()
>>> # -------------------------------------------------
>>> 
>>> Can someone please help me figure out what is wrong? I'm on a Mac
>>> running 10.6, python 2.6, matplotlib 1.0, and I have TeX installed.
>>> 
>> Works on my system if you use a raw string (note ``r`` before string):
>> 
>>>>> pyplot.plot([1,2,3], label=r'$\alpha > \beta$')
>> 
>> Does that fix your problem?
> 
> Unfortunately, no. When I use a raw string, I just get "*a@" instead
> of the expected result. See attached figure for proof. I still get a
> long list of errors of fonts not being found.
> 
> Jeremy
> <mathfont.pdf>
Hmm, that strange. All the fonts it says aren't found are fonts that should be included in the Matplotlib install. I have pretty much the same setup as you (OSX 10.6, python 2.6), although I'm on Matplotlib trunk. Is it possible your install got screwed up some how. Have you tried a clean install of Matplotlib?
If that doesn't work, I'm afraid I won't be of much help, since I can't really reproduce this on my system. Maybe, someone who knows the font system better can help.
Best,
-Tony
From: Gökhan S. <gok...@gm...> - 2010年09月08日 18:26:08
It is clear with python -c "import matplotlib"
I can't seem to find any "dateutil" phrase occurring within the IPython
installation folder (/site-packages/IPython)
Where else to look for?
On Wed, Sep 8, 2010 at 12:35 PM, Aman Thakral <ama...@gm...>wrote:
> try this in the terminal:
> python -c "import matplotlib"
>
> -Aman
>
> On Wed, Sep 8, 2010 at 12:17 PM, Gökhan Sever <gok...@gm...>wrote:
>
>> Hello,
>>
>> My usual ipython -pylab is giving me these warnings after I installed
>> matplotlib from the source (matplotlib rev.8624 using python setupegg.py
>> develop).
>>
>> /usr/lib/python2.6/site-packages/EPDLab-3.0.1.dev_r24658-py2.6.egg/enthought/__init__.py:7:
>> UserWarning: Module dateutil was already imported from
>> /home/user/Desktop/python-repo/matplotlib/lib/dateutil/__init__.pyc, but
>> /usr/lib/python2.6/site-packages is being added to sys.path
>> __import__('pkg_resources').declare_namespace(__name__)
>>
>>
>> Under /site-packages in easy-install.pth I moved
>> the /home/user/Desktop/python-repo/matplotlib/lib line to the very bottom of
>> the file but this doesn't make any change.
>>
>> Any ideas how to remove this warning?
>>
>> --
>> Gökhan
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net Dev2Dev email is sponsored by:
>>
>> Show off your parallel programming skills.
>> Enter the Intel(R) Threading Challenge 2010.
>> http://p.sf.net/sfu/intel-thread-sfd
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
>
> --
> Aman Thakral
> B.Eng & Biosci, M.Eng Design
>
-- 
Gökhan
From: Andre' Walker-L. <awa...@lb...> - 2010年09月08日 18:20:24
It may not be an MPL issue, but rather Snow Leopard.
I have a friend who had font troubles, but it was because Mac OSX 10.6 
(Snow Leopard) changed the way fonts are handled. He had a file in 
his home directory (which he created on 10.5) which had some font 
specifications, which he had to alter/remove to fix his trouble.
I can't remember any more details, but thought I would share in case 
this helps.
Andre
On Sep 8, 2010, at 8:56 AM, Jeremy Conlin wrote:
> I have trouble getting any symbols or any super/sub scripts to work
> since I upgraded to 1.0 a few months ago. I always get a message
> saying that some font isn't found. This occurs whenever I try to put
> symbols, superscripts, or subscripts in a label, or when I use a log
> scale (because then it MPL has to use superscripts). I have tried
> changing my matplotlibrc file but haven't found any combination of
> settings that help.
>
> To illustrate the problem, I have included three files, one python
> file and the other the error as captured from the output as well as my
> matplotlibrc file. The python file is trivial:
>
> # -------------------------------------------------
> import matplotlib.pyplot as pyplot
>
> pyplot.plot([1,2,3], label='$\alpha > \beta$')
>
> pyplot.legend()
> pyplot.show()
> # -------------------------------------------------
>
> Can someone please help me figure out what is wrong? I'm on a Mac
> running 10.6, python 2.6, matplotlib 1.0, and I have TeX installed.
>
> Thanks,
> Jeremy
> < 
> mathfonterror 
> .txt 
> > 
> < 
> mathfont 
> .py 
> > 
> < 
> matplotlibrc 
> > 
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd_______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Jeremy C. <jlc...@gm...> - 2010年09月08日 18:10:47
Attachments: mathfont.pdf
On Wed, Sep 8, 2010 at 10:42 AM, Tony S Yu <ts...@gm...> wrote:
>
> On Sep 8, 2010, at 11:56 AM, Jeremy Conlin wrote:
>
>> I have trouble getting any symbols or any super/sub scripts to work
>> since I upgraded to 1.0 a few months ago. I always get a message
>> saying that some font isn't found. This occurs whenever I try to put
>> symbols, superscripts, or subscripts in a label, or when I use a log
>> scale (because then it MPL has to use superscripts). I have tried
>> changing my matplotlibrc file but haven't found any combination of
>> settings that help.
>>
>> To illustrate the problem, I have included three files, one python
>> file and the other the error as captured from the output as well as my
>> matplotlibrc file. The python file is trivial:
>>
>> # -------------------------------------------------
>> import matplotlib.pyplot as pyplot
>>
>> pyplot.plot([1,2,3], label='$\alpha > \beta$')
>>
>> pyplot.legend()
>> pyplot.show()
>> # -------------------------------------------------
>>
>> Can someone please help me figure out what is wrong? I'm on a Mac
>> running 10.6, python 2.6, matplotlib 1.0, and I have TeX installed.
>>
> Works on my system if you use a raw string (note ``r`` before string):
>
>>>> pyplot.plot([1,2,3], label=r'$\alpha > \beta$')
>
> Does that fix your problem?
Unfortunately, no. When I use a raw string, I just get "*a@" instead
of the expected result. See attached figure for proof. I still get a
long list of errors of fonts not being found.
Jeremy
From: Aman T. <ama...@gm...> - 2010年09月08日 17:36:17
try this in the terminal:
python -c "import matplotlib"
-Aman
On Wed, Sep 8, 2010 at 12:17 PM, Gökhan Sever <gok...@gm...> wrote:
> Hello,
>
> My usual ipython -pylab is giving me these warnings after I installed
> matplotlib from the source (matplotlib rev.8624 using python setupegg.py
> develop).
>
> /usr/lib/python2.6/site-packages/EPDLab-3.0.1.dev_r24658-py2.6.egg/enthought/__init__.py:7:
> UserWarning: Module dateutil was already imported from
> /home/user/Desktop/python-repo/matplotlib/lib/dateutil/__init__.pyc, but
> /usr/lib/python2.6/site-packages is being added to sys.path
> __import__('pkg_resources').declare_namespace(__name__)
>
>
> Under /site-packages in easy-install.pth I moved
> the /home/user/Desktop/python-repo/matplotlib/lib line to the very bottom of
> the file but this doesn't make any change.
>
> Any ideas how to remove this warning?
>
> --
> Gökhan
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
-- 
Aman Thakral
B.Eng & Biosci, M.Eng Design
From: Michael D. <md...@st...> - 2010年09月08日 16:43:38
On 09/02/2010 10:23 AM, Benjamin Root wrote:
> On Thu, Sep 2, 2010 at 9:11 AM, Ryan May <rm...@gm... 
> <mailto:rm...@gm...>> wrote:
>
> On Thu, Sep 2, 2010 at 2:15 AM, Mitesh Patel <qe...@gm...
> <mailto:qe...@gm...>> wrote:
> > Hello,
> >
> > Is it possible to specify both an alpha level and a background
> color so
> > that an entire saved image has a uniform transparency and color?
> For
> > example, with matplotlib 1.0.0, this script yields the attached
> image:
> >
> > from matplotlib.pyplot import figure, savefig, show
> >
> > fig = figure()
> > ax = fig.add_subplot(111)
> > ax.plot([1,2,3])
> >
> > fig.patch.set_alpha(0.5)
> > for ax in fig.axes:
> > ax.patch.set_alpha(0.5)
> >
> > fig.patch.set_facecolor('red')
> > for ax in fig.axes:
> > ax.patch.set_facecolor('red')
> >
> > savefig('test.png', facecolor='red')
> >
> >
> > In particular, the areas inside and outside the axes have different
> > transparency level and color. Perhaps I'm over/mis/ab-using the
> options
> > here?
>
> It's not that they're not uniform--you're seeing alpha blending
> between the figure patch and the axes patch. Within the axes, both are
> being rendered and blended together. This is more readily apparent if
> you use blue for the axes patch, as I did for the attached image. When
> the red and blue are blended together, you end up with purple. If you
> want it all uniform, you'd be better off setting the axes patch to an
> alpha of 0.0.
>
> Ryan
>
>
> This also raises another pet peeve of mine. The Agg backend seems to 
> use linear blending for alpha. This is inconsistent with how the 
> world works. It is more realistic for logarithmic blending, or at 
> least, a piece-wise linear blending.
>
> Imagine I have two overlapping objects with alpha set to .5 (a_1 and 
> a_2). What is rendered in matplotlib is completely opaque. A more 
> realistic result would have a final alpha setting of .75 (i.e. - the 
> first item takes away half the transparency, then the second item 
> takes away half of the remaining transparency.
>
> I am not nearly familiar enough with the Agg backend to know how to 
> implement this. Is this at all feasible?
The problem is that then the other backends (PDF, SVG etc) would have 
different alpha blending behavior. If that can be resolved, then I 
think getting Agg to handle logarithmic blending is the easy part.
Mike
-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA
From: Tony S Yu <ts...@gm...> - 2010年09月08日 16:43:15
On Sep 8, 2010, at 11:56 AM, Jeremy Conlin wrote:
> I have trouble getting any symbols or any super/sub scripts to work
> since I upgraded to 1.0 a few months ago. I always get a message
> saying that some font isn't found. This occurs whenever I try to put
> symbols, superscripts, or subscripts in a label, or when I use a log
> scale (because then it MPL has to use superscripts). I have tried
> changing my matplotlibrc file but haven't found any combination of
> settings that help.
> 
> To illustrate the problem, I have included three files, one python
> file and the other the error as captured from the output as well as my
> matplotlibrc file. The python file is trivial:
> 
> # -------------------------------------------------
> import matplotlib.pyplot as pyplot
> 
> pyplot.plot([1,2,3], label='$\alpha > \beta$')
> 
> pyplot.legend()
> pyplot.show()
> # -------------------------------------------------
> 
> Can someone please help me figure out what is wrong? I'm on a Mac
> running 10.6, python 2.6, matplotlib 1.0, and I have TeX installed.
> 
Works on my system if you use a raw string (note ``r`` before string):
>>> pyplot.plot([1,2,3], label=r'$\alpha > \beta$')
Does that fix your problem?
-Tony
From: Gökhan S. <gok...@gm...> - 2010年09月08日 16:17:12
Hello,
My usual ipython -pylab is giving me these warnings after I installed
matplotlib from the source (matplotlib rev.8624 using python setupegg.py
develop).
/usr/lib/python2.6/site-packages/EPDLab-3.0.1.dev_r24658-py2.6.egg/enthought/__init__.py:7:
UserWarning: Module dateutil was already imported from
/home/user/Desktop/python-repo/matplotlib/lib/dateutil/__init__.pyc, but
/usr/lib/python2.6/site-packages is being added to sys.path
 __import__('pkg_resources').declare_namespace(__name__)
Under /site-packages in easy-install.pth I moved
the /home/user/Desktop/python-repo/matplotlib/lib line to the very bottom of
the file but this doesn't make any change.
Any ideas how to remove this warning?
-- 
Gökhan
From: Jeremy C. <jlc...@gm...> - 2010年09月08日 15:56:43
I have trouble getting any symbols or any super/sub scripts to work
since I upgraded to 1.0 a few months ago. I always get a message
saying that some font isn't found. This occurs whenever I try to put
symbols, superscripts, or subscripts in a label, or when I use a log
scale (because then it MPL has to use superscripts). I have tried
changing my matplotlibrc file but haven't found any combination of
settings that help.
To illustrate the problem, I have included three files, one python
file and the other the error as captured from the output as well as my
matplotlibrc file. The python file is trivial:
# -------------------------------------------------
import matplotlib.pyplot as pyplot
pyplot.plot([1,2,3], label='$\alpha > \beta$')
pyplot.legend()
pyplot.show()
# -------------------------------------------------
Can someone please help me figure out what is wrong? I'm on a Mac
running 10.6, python 2.6, matplotlib 1.0, and I have TeX installed.
Thanks,
Jeremy
From: Michael D. <md...@st...> - 2010年09月08日 15:53:14
I believe this is now fixed in r8691 (branch and trunk).
Mike
On 09/03/2010 02:51 PM, Eric Firing wrote:
> On 08/31/2010 01:08 AM, Jens Nie wrote:
> 
>> Hi everyone.
>> I face a problem here, which I can’t seem to handle by myself, so any
>> help is really appreciated.
>> I would like to do a simple line plot of a huge dataset as an overview
>> to quickly compare success of different measurement scenarios, and it
>> seems that not every datapoint is displayed. I played a little with the
>> lod parameter, both for the creation of the axis and the plot command.
>> However timing the plot command and the display itself do not show
>> differences. Here are a few lines of code that help to reproduce the
>> problem.
>> 
> Jens,
>
> I'm confident this is the same bug as was reported more recently on the
> list and the tracker:
>
> https://sourceforge.net/tracker/index.php?func=detail&aid=3058804&group_id=80706&atid=560720
>
> That report will make it easier to debug because it illustrates the
> problem with a relatively few points.
>
>
> Eric
>
> 
>> import time
>> import matplotlib
>> matplotlib.use("Qt4Agg")
>> import matplotlib.pyplot as plt
>> import numpy as np
>> xData=np.linspace(0, 10.0, 1e6)
>> yData=np.zeros(xData.shape)
>> xDataDetail=np.linspace(0.0, 2*np.pi, 1000)
>> yDataDetail=np.exp(-xDataDetail)*np.sin(10.0*xDataDetail)
>> yData[100000:100000+len(yDataDetail)]=yDataDetail
>> fig=plt.figure()
>> axes=fig.add_subplot(111)
>> tic=time.time()
>> axes.plot(xData, yData, "b-")
>> toc=time.time()
>> axes.grid(True)
>> print "Plotting took %g s." % (toc-tic)
>> plt.show()
>> The code shows how I usually use the matplotlib environment and creates
>> a simple dataset of 1 million zeros with a short non trivial peak
>> within, that is to be plotted as a blue solid line.
>> You can see what happens, when you vary the width of the displaying
>> window. On my system usually the minimum amplitude varies when resizing
>> the window.
>> Is there any way to enforce plotting each and every point?
>> I use matplotlib version 1.0.0 on a 32 Bit windows XP system installed
>> via the windows installer from sf.
>> A quick check on a opensuse 11.3 linux box showed the same issue. Using
>> the "standard" TK backend instead of Qt4Agg behaves just the same.
>> Jens
>>
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net Dev2Dev email is sponsored by:
>>
>> Show off your parallel programming skills.
>> Enter the Intel(R) Threading Challenge 2010.
>> http://p.sf.net/sfu/intel-thread-sfd
>>
>>
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> 
>
>
> ------------------------------------------------------------------------------
> This SF.net Dev2Dev email is sponsored by:
>
> Show off your parallel programming skills.
> Enter the Intel(R) Threading Challenge 2010.
> http://p.sf.net/sfu/intel-thread-sfd
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA
7 messages has been excluded from this view by a project administrator.

Showing results of 412

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