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

Showing results of 277

<< < 1 2 3 4 .. 12 > >> (Page 2 of 12)
From: Richard A. <ral...@in...> - 2006年09月27日 13:59:24
I am getting closer to the results I want by modifying my days and hours
locators to read:
days = WeekdayLocator(byweekday=(MO, TU, WE, TH, FR))
hours = HourLocator(byhour=range(9,17,1))
but the xaxis still fills in times for the rest of each day interval,
but now only shows xtick labels for the period during the day i am
concerned with. Is there a way to limit the hours plotted on the xaxis
for each day interval?
On Tue, 2006年09月26日 at 16:47 -0400, Richard Albright wrote:
> I am trying to figure out how i can use IndexLocator with DateFormatter.
> Currently i am only using DayLocator and HourLocator in my code, but it
> is showing ticks for all hours in the plot, when I only care about
> plotting the hours for when data is available.
> 
> I already applied date2num to my dates in the x list below.
> 
> 
> 
> from matplotlib.dates import IndexDateFormatter, DateFormatter, date2num
> 
> import matplotlib
> 
> from matplotlib import rc
> 
> import datetime
> from pylab import *
> 
> 
> x = [732559.39583333337, 732559.40625, 732559.41666666663,
> 732559.42708333337,
> 732559.4375, 732559.44791666663, 732559.45833333337, 732559.46875, 
> 732559.47916666663 , 732559.48958333337, 732559.5,
> 732559.51041666663, 
> 732559.52083333337, 732559.53125, 732559.54166666663,
> 732559.55208333337,
> 732559.5625, 732559.57291666663, 732559.58333333337, 732559.59375, 
> 732559.60416666663, 732559.61458333337, 732559.625,
> 732559.63541666663, 
> 732559.64583333337, 732559.65625, 732559.66666666663,
> 732560.39583333337, 
> 732560.40625, 732560.41666666663, 732560.42708333337, 732560.4375, 
> 732560.44791666663, 732560.45833333337, 732560.46875,
> 732560.47916666663, 
> 732560.48958333337, 732560.5, 732560.51041666663,
> 732560.52083333337, 
> 732560.53125, 732560.54166666663, 732560.55208333337, 732560.5625, 
> 732560.57291666663, 732560.58333333337, 732560.59375,
> 732560.60416666663, 
> 732560.61458333337, 732560.625, 732560.63541666663,
> 732560.64583333337, 
> 732560.65625, 732560.66666666663]
> y = [13.07, 13.050000000000001, 13.029999999999999, 13.039999999999999, 
> 13.029999999999999, 13.0, 13.0, 13.0, 13.0, 13.029999999999999,
> 13.02, 
> 13.01, 12.99, 12.98, 12.98, 12.960000000000001, 12.94, 12.92, 
> 12.960000000000001, 12.98, 13.19, 13.140000000000001,
> 13.130000000000001, 
> 13.109999999999999, 13.08, 13.109999999999999, 13.039999999999999,
> 13.15, 
> 13.130000000000001, 13.15, 13.279999999999999, 13.210000000000001, 
> 13.199999999999999, 13.199999999999999, 13.19, 13.199999999999999, 
> 13.140000000000001, 13.119999999999999, 13.1, 13.09,
> 13.130000000000001, 
> 13.119999999999999, 13.130000000000001, 13.130000000000001, 
> 13.140000000000001, 13.15, 13.16, 13.119999999999999,
> 13.119999999999999, 
> 13.1, 13.050000000000001, 13.029999999999999, 13.02, 13.0]
> 
> datesindex = range(len(x))
> 
> days = DayLocator()
> hours = HourLocator()
> ax = subplot(111)
> plot(x, y)
> 
> ax.xaxis.set_major_locator(days)
> ax.xaxis.set_major_formatter(DateFormatter('%Y-%m-%d %H:%M:%S'))
> ax.xaxis.set_minor_locator(hours)
> ax.xaxis.set_minor_formatter(DateFormatter('%H:%M:%S'))
> setp(ax.get_xticklabels(), 'rotation', 90, 'horizontalalignment',
> 'center', fontsize=8)
> minorlabels = [tick.label1 for tick in ax.xaxis.get_minor_ticks()]
> setp(minorlabels, 'rotation', 90, 'horizontalalignment', 'center',
> fontsize=8)
> 
> grid(True)
> show()
> 
> Any suggestions would be greatly appreciated.
> 
-- 
Rick Albright
Senior Quantitvative Analyst
Indie Research, LLC
254 Witherspoon Street
Princeton, NJ 08542
(609)497-1030
ral...@in...
From: Scott R. <sr...@nr...> - 2006年09月27日 03:32:02
Hi All,
I think I might have uncovered a bug in the legend code when using
multiple patches so that only the first patch type is used in the
legend.
In [41]: matplotlib.__version__
Out[41]: '0.87.5'
(that is revision 2782 from SVN)
Here is some code that shows the problem:
------------------------------
from pylab import *
binctrs = linspace(-4.0, 4.0, 15)
vals = randn(1000)
n1, bins1, p1 = hist(vals, binctrs, align='center')
n2, bins2, p2 = hist(vals[:300], binctrs, align='center')
setp(p1, 'facecolor', 'k', 'alpha', 0.2)
setp(p2, 'facecolor', 'g', 'alpha', 0.9)
legend((p1, p2), ("Frobs", "NewFrobs"))
show()
------------------------------
Thanks,
Scott
-- 
Scott M. Ransom Address: NRAO
Phone: (434) 296-0320 520 Edgemont Rd.
email: sr...@nr... Charlottesville, VA 22903 USA
GPG Fingerprint: 06A9 9553 78BE 16DB 407B FFCA 9BFA B6FF FFD3 2989
From: Richard A. <ral...@in...> - 2006年09月26日 20:47:54
I am trying to figure out how i can use IndexLocator with DateFormatter.
Currently i am only using DayLocator and HourLocator in my code, but it
is showing ticks for all hours in the plot, when I only care about
plotting the hours for when data is available.
I already applied date2num to my dates in the x list below.
from matplotlib.dates import IndexDateFormatter, DateFormatter, date2num
import matplotlib
from matplotlib import rc
import datetime
from pylab import *
x = [732559.39583333337, 732559.40625, 732559.41666666663,
732559.42708333337,
 732559.4375, 732559.44791666663, 732559.45833333337, 732559.46875, 
 732559.47916666663 , 732559.48958333337, 732559.5,
732559.51041666663, 
 732559.52083333337, 732559.53125, 732559.54166666663,
732559.55208333337,
 732559.5625, 732559.57291666663, 732559.58333333337, 732559.59375, 
 732559.60416666663, 732559.61458333337, 732559.625,
732559.63541666663, 
 732559.64583333337, 732559.65625, 732559.66666666663,
732560.39583333337, 
 732560.40625, 732560.41666666663, 732560.42708333337, 732560.4375, 
 732560.44791666663, 732560.45833333337, 732560.46875,
732560.47916666663, 
 732560.48958333337, 732560.5, 732560.51041666663,
732560.52083333337, 
 732560.53125, 732560.54166666663, 732560.55208333337, 732560.5625, 
 732560.57291666663, 732560.58333333337, 732560.59375,
732560.60416666663, 
 732560.61458333337, 732560.625, 732560.63541666663,
732560.64583333337, 
 732560.65625, 732560.66666666663]
y = [13.07, 13.050000000000001, 13.029999999999999, 13.039999999999999, 
 13.029999999999999, 13.0, 13.0, 13.0, 13.0, 13.029999999999999,
13.02, 
 13.01, 12.99, 12.98, 12.98, 12.960000000000001, 12.94, 12.92, 
 12.960000000000001, 12.98, 13.19, 13.140000000000001,
13.130000000000001, 
 13.109999999999999, 13.08, 13.109999999999999, 13.039999999999999,
13.15, 
 13.130000000000001, 13.15, 13.279999999999999, 13.210000000000001, 
 13.199999999999999, 13.199999999999999, 13.19, 13.199999999999999, 
 13.140000000000001, 13.119999999999999, 13.1, 13.09,
13.130000000000001, 
 13.119999999999999, 13.130000000000001, 13.130000000000001, 
 13.140000000000001, 13.15, 13.16, 13.119999999999999,
13.119999999999999, 
 13.1, 13.050000000000001, 13.029999999999999, 13.02, 13.0]
datesindex = range(len(x))
days = DayLocator()
hours = HourLocator()
ax = subplot(111)
plot(x, y)
ax.xaxis.set_major_locator(days)
ax.xaxis.set_major_formatter(DateFormatter('%Y-%m-%d %H:%M:%S'))
ax.xaxis.set_minor_locator(hours)
ax.xaxis.set_minor_formatter(DateFormatter('%H:%M:%S'))
setp(ax.get_xticklabels(), 'rotation', 90, 'horizontalalignment',
'center', fontsize=8)
minorlabels = [tick.label1 for tick in ax.xaxis.get_minor_ticks()]
setp(minorlabels, 'rotation', 90, 'horizontalalignment', 'center',
fontsize=8)
grid(True)
show()
Any suggestions would be greatly appreciated.
-- 
Rick Albright
Senior Quantitvative Analyst
Indie Research, LLC
254 Witherspoon Street
Princeton, NJ 08542
(609)497-1030
ral...@in...
From: <zh...@um...> - 2006年09月26日 20:17:28
Thanks in advance for the command name
From: Charlie M. <cw...@gm...> - 2006年09月26日 20:12:35
matplotlib-0.87.5 is not compatible with python2.5. We are planning a
minor rev bump tomorrow to address this. You can wait until then or
trying building from svn.
On 9/26/06, dj...@pd... <dj...@pd...> wrote:
> I have installed Python 2.5 as a separate installation from 2.4, and am trying
> to install matplotlib in the site-packages of the new version. I have installed
> numpy and scipy successfully, but am having the following trouble when I try to
> setup matplotlib. Any suggestions?
>
> thank you...
> _________________________________________________________________________
> dell@Dell_server:~/Python-2.5/Lib/site-packages/matplotlib-0.87.5$ sudo
> python2.5 setup.py build
> GTK requires pygtk
> TKAgg requires TkInter
> GTKAgg requires pygtk
> running build
> running build_py
> running build_ext
> building 'matplotlib._agg' extension
> C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
> -Wstrict-prototypes -fPIC
>
> compile options: '-Iagg23/include -Isrc -Iswig -I/usr/local/include/python2.5
> -c'
> gcc: src/agg.cxx
> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
> Ada/C/ObjC but not for C++
> src/agg.cxx: In function 'int SWIG_Python_ConvertPtr(PyObject*, void**,
> swig_type_info*, int)':
> src/agg.cxx:1231: error: invalid conversion from 'const char*' to 'char*'
> src/agg.cxx: In function 'void SWIG_Python_FixMethods(PyMethodDef*,
> swig_const_info*, swig_type_info**, swig_type_info**)':
> src/agg.cxx:27624: error: invalid conversion from 'const char*' to 'char*'
> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
> Ada/C/ObjC but not for C++
> src/agg.cxx: In function 'int SWIG_Python_ConvertPtr(PyObject*, void**,
> swig_type_info*, int)':
> src/agg.cxx:1231: error: invalid conversion from 'const char*' to 'char*'
> src/agg.cxx: In function 'void SWIG_Python_FixMethods(PyMethodDef*,
> swig_const_info*, swig_type_info**, swig_type_info**)':
> src/agg.cxx:27624: error: invalid conversion from 'const char*' to 'char*'
> error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
> -Wstrict-prototypes -fPIC -Iagg23/include -Isrc -Iswig
> -I/usr/local/include/python2.5 -c src/agg.cxx -o
> build/temp.linux-i686-2.5/src/agg.o" failed with exit status 1
> dell@Dell_server:~/Python-2.5/Lib/site-packages/matplotlib-0.87.5$
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Robert K. <rob...@gm...> - 2006年09月26日 19:24:39
hu...@ya... wrote:
> But why the compatibility function is used? Not the new one from numpy? I 
> didn't ask for a Numeric compatibility?
> I don't understand the need to have the Numeric function when I'm using numpy.
The numerix layer is also used internally by matplotlib such that it does not 
need to have three different implementations to support the three array 
packages. It serves to be a uniform layer over the three packages, not just 
serve as a common place to get array functions from. That it is also exposed by 
importing everything from pylab is a side effect. If you don't want this, then 
you can configure ipython to import everything you want from numpy *after* pylab.
-- 
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
 -- Umberto Eco
From: <zh...@um...> - 2006年09月26日 19:23:35
Hi,
I want to write a program that will show up some graphs one by one
automatically, but it turns out that I have to close the very first one
manually (which is not what I want), then the following will show up
automatically one by one. Any suggestions will be greatly appreciated.
Best Regards, John
from pylab import *
a=[1,2,3,4,5]
b=[1,2,3,4,5]
c=[2,4,9,16,25]
clf()
plot(a,b)
show()
close()
plot(a,c,'r')
show()
close()
plot(a,c,'r')
show()
close()
From: <hu...@ya...> - 2006年09月26日 19:18:42
But why the compatibility function is used? Not the new one from numpy? I=20
didn't ask for a Numeric compatibility?
I don't understand the need to have the Numeric function when I'm using num=
py.
I think this is a bad "feature" perhaps not a bug but not the thing that th=
e=20
majority of people would like. In my opinion, if numerix is define to be=20
numpy, all the function from numpy must be the default ones. In other hand=
=20
that will confuse plenty of people.=20
Now I understand that I have to avoid all numerix function. The problem is=
=20
that I love to use ipython -pylab and so I have to be more careful when I'm=
=20
doing fast plot...
N.
Le mardi 26 septembre 2006 14:00, Eric Firing a =E9crit=A0:
> It is not a bug in numerix; numerix is using an older version of where,
> provided by numpy for compatibility with Numeric:
>
> In [4]:numpy.where?
> Type: builtin_function_or_method
> Base Class: <type 'builtin_function_or_method'>
> String Form: <built-in function where>
> Namespace: Interactive
> Docstring:
> where(condition, | x, y)
>
> The result is shaped like condition and has elements of x and y where
> condition is respectively true or false. If x or y are not given,
> then it is equivalent to condition.nonzero().
>
> To group the indices by element, rather than dimension, use
>
> transpose(where(condition, | x, y))
>
> instead. This always results in a 2d array, with a row of indices for
> each element that satisfies the condition.
>
>
> In [5]:pylab.where?
> Type: function
> Base Class: <type 'function'>
> String Form: <function where at 0xb6e2a924>
> Namespace: Interactive
> File:
> /usr/lib/python2.4/site-packages/numpy/oldnumeric/functions.py
> Definition: pylab.where(condition, x, y)
> Docstring:
> <no docstring>
>
>
> Eric
>
> hu...@ya... wrote:
> > Hi,
> >
> > I think there are a bug in numerix. I was expecting the same result from
> > pylab.where and numpy.where (in my matplotlibrc I have numerix define
> > for numpy) but like you can see in the following example the result is
> > quite different.
> >
> > N.
> >
> >
> >
> >
> > Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
> > Type "copyright", "credits" or "license" for more information.
> >
> > IPython 0.7.3.svn -- An enhanced Interactive Python.
> > ? -> Introduction to IPython's features.
> > %magic -> Information about IPython's 'magic' % functions.
> > help -> Python's own help system.
> > object? -> Details about 'object'. ?object also works, ?? prints more.
> >
> > Welcome to pylab, a matplotlib-based Python environment.
> > For more information, type 'help(pylab)'.
> >
> > In [1]: import numpy
> >
> > In [2]: a =3D numpy.arange(123)
> >
> > In [3]: pylab.where(a>23)
> > -----------------------------------------------------------------------=
=2D-
> >-- exceptions.TypeError Traceback (most
> > recent call last)
> >
> > /home/humufr/<ipython console>
> >
> > TypeError: where() takes exactly 3 arguments (1 given)
> >
> > In [4]: from matplotlib import rcParams
> >
> > In [5]: rcPara
> > rcParams rcParamsDefault
> >
> > In [5]: rcParams['numerix']
> > Out[5]: 'numpy'
> >
> > In [6]: numpy.where(a>23)
> > Out[6]:
> > (array([ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
> > 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
> > 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
> > 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
> > 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
> > 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
> > 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
> > 115, 116, 117, 118, 119, 120, 121, 122]),)
> >
> > -----------------------------------------------------------------------=
=2D-
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share
> > your opinions on IT & business topics through brief surveys -- and earn
> > cash
> > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=
=3DDEVDEV
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys -- and earn
> cash
> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: <dj...@pd...> - 2006年09月26日 18:14:52
I have installed Python 2.5 as a separate installation from 2.4, and am t=
rying
to install matplotlib in the site-packages of the new version. I have ins=
talled
numpy and scipy successfully, but am having the following trouble when I =
try to
setup matplotlib. Any suggestions?
thank you...
_________________________________________________________________________
dell@Dell_server:~/Python-2.5/Lib/site-packages/matplotlib-0.87.5$ sudo
python2.5 setup.py build
GTK requires pygtk
TKAgg requires TkInter
GTKAgg requires pygtk
running build
running build_py
running build_ext
building 'matplotlib._agg' extension
C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC
compile options: '-Iagg23/include -Isrc -Iswig -I/usr/local/include/pytho=
n2.5
-c'
gcc: src/agg.cxx
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
src/agg.cxx: In function =91int SWIG_Python_ConvertPtr(PyObject*, void**,
swig_type_info*, int)=92:
src/agg.cxx:1231: error: invalid conversion from =91const char*=92 to =91=
char*=92
src/agg.cxx: In function =91void SWIG_Python_FixMethods(PyMethodDef*,
swig_const_info*, swig_type_info**, swig_type_info**)=92:
src/agg.cxx:27624: error: invalid conversion from =91const char*=92 to =91=
char*=92
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
src/agg.cxx: In function =91int SWIG_Python_ConvertPtr(PyObject*, void**,
swig_type_info*, int)=92:
src/agg.cxx:1231: error: invalid conversion from =91const char*=92 to =91=
char*=92
src/agg.cxx: In function =91void SWIG_Python_FixMethods(PyMethodDef*,
swig_const_info*, swig_type_info**, swig_type_info**)=92:
src/agg.cxx:27624: error: invalid conversion from =91const char*=92 to =91=
char*=92
error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC -Iagg23/include -Isrc -Iswig
-I/usr/local/include/python2.5 -c src/agg.cxx -o
build/temp.linux-i686-2.5/src/agg.o" failed with exit status 1
dell@Dell_server:~/Python-2.5/Lib/site-packages/matplotlib-0.87.5$
From: Eric F. <ef...@ha...> - 2006年09月26日 18:00:42
It is not a bug in numerix; numerix is using an older version of where, 
provided by numpy for compatibility with Numeric:
In [4]:numpy.where?
Type: builtin_function_or_method
Base Class: <type 'builtin_function_or_method'>
String Form: <built-in function where>
Namespace: Interactive
Docstring:
 where(condition, | x, y)
 The result is shaped like condition and has elements of x and y where
 condition is respectively true or false. If x or y are not given,
 then it is equivalent to condition.nonzero().
 To group the indices by element, rather than dimension, use
 transpose(where(condition, | x, y))
 instead. This always results in a 2d array, with a row of indices for
 each element that satisfies the condition.
In [5]:pylab.where?
Type: function
Base Class: <type 'function'>
String Form: <function where at 0xb6e2a924>
Namespace: Interactive
File: 
/usr/lib/python2.4/site-packages/numpy/oldnumeric/functions.py
Definition: pylab.where(condition, x, y)
Docstring:
 <no docstring>
Eric
hu...@ya... wrote:
> Hi,
> 
> I think there are a bug in numerix. I was expecting the same result from 
> pylab.where and numpy.where (in my matplotlibrc I have numerix define for 
> numpy) but like you can see in the following example the result is quite 
> different.
> 
> N.
> 
> 
> 
> 
> Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
> Type "copyright", "credits" or "license" for more information.
> 
> IPython 0.7.3.svn -- An enhanced Interactive Python.
> ? -> Introduction to IPython's features.
> %magic -> Information about IPython's 'magic' % functions.
> help -> Python's own help system.
> object? -> Details about 'object'. ?object also works, ?? prints more.
> 
> Welcome to pylab, a matplotlib-based Python environment.
> For more information, type 'help(pylab)'.
> 
> In [1]: import numpy
> 
> In [2]: a = numpy.arange(123)
> 
> In [3]: pylab.where(a>23)
> ---------------------------------------------------------------------------
> exceptions.TypeError Traceback (most recent 
> call last)
> 
> /home/humufr/<ipython console>
> 
> TypeError: where() takes exactly 3 arguments (1 given)
> 
> In [4]: from matplotlib import rcParams
> 
> In [5]: rcPara
> rcParams rcParamsDefault
> 
> In [5]: rcParams['numerix']
> Out[5]: 'numpy'
> 
> In [6]: numpy.where(a>23)
> Out[6]:
> (array([ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
> 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
> 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
> 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
> 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
> 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
> 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
> 115, 116, 117, 118, 119, 120, 121, 122]),)
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Lionel R. <lro...@li...> - 2006年09月26日 15:30:15
Le mardi 26 septembre 2006 16:29, John Hunter a =E9crit=A0:
> I'm not sure what you are trying to do here. How about
>
> ax =3D subplot(111)
> ax.plot([1,2,3], '-', label=3D'a line')
> ax.legend()
I don't know if it's a normal way with mpl, but with your example or with m=
y=20
datas, the legend doesn't have a line beside the text, just the space for i=
t.=20
If I use linestyle=3D'o', the marked is drawn.
=2D-=20
Lionel Roubeyrie - lro...@li...
LIMAIR
http://www.limair.asso.fr
From: Rob H. <he...@ta...> - 2006年09月26日 15:08:56
I successfully compiled numpy/scipy/mpl on my Intel mac (OS X 10.4.7 
with gfortran) with the latest Universal MacPython 2.5. Everything 
went through without a hitch. I've been waiting for this for a while 
now (between desire for ctypes, and macpython 2.4 readline issues), 
and I am very happy to have it up and running.
Thanks to everyone who makes this happen,
-Rob
----
Rob Hetland, Associate Professor
Dept. of Oceanography, Texas A&M University
http://pong.tamu.edu/~rob
phone: 979-458-0096, fax: 979-845-6331
From: John H. <jdh...@ac...> - 2006年09月26日 14:44:21
>>>>> "Lionel" == Lionel Roubeyrie <lro...@li...> writes:
 Lionel> Yes, I have seen my error too late, thanks. But I can't
 Lionel> get a line in the legend, just markers?
I'm not sure what you are trying to do here. How about
 
 ax = subplot(111)
 ax.plot([1,2,3], '-', label='a line')
 ax.legend()
JDH
From: <hu...@ya...> - 2006年09月26日 13:25:03
Hi,
I think there are a bug in numerix. I was expecting the same result from 
pylab.where and numpy.where (in my matplotlibrc I have numerix define for 
numpy) but like you can see in the following example the result is quite 
different.
N.
Python 2.4.3 (#2, Apr 27 2006, 14:43:58)
Type "copyright", "credits" or "license" for more information.
IPython 0.7.3.svn -- An enhanced Interactive Python.
? -> Introduction to IPython's features.
%magic -> Information about IPython's 'magic' % functions.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
 Welcome to pylab, a matplotlib-based Python environment.
 For more information, type 'help(pylab)'.
In [1]: import numpy
In [2]: a = numpy.arange(123)
In [3]: pylab.where(a>23)
---------------------------------------------------------------------------
exceptions.TypeError Traceback (most recent 
call last)
/home/humufr/<ipython console>
TypeError: where() takes exactly 3 arguments (1 given)
In [4]: from matplotlib import rcParams
In [5]: rcPara
rcParams rcParamsDefault
In [5]: rcParams['numerix']
Out[5]: 'numpy'
In [6]: numpy.where(a>23)
Out[6]:
(array([ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75,
 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,
 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101,
 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114,
 115, 116, 117, 118, 119, 120, 121, 122]),)
From: Lionel R. <lro...@li...> - 2006年09月26日 13:10:11
Le mardi 26 septembre 2006 14:22, John Hunter a =E9crit=A0:
> Make sure you pass in a list of strings, and not a single string. If
> you have just a single string, it interprets it as a list of
> characters.
>
> JDH
Yes, I have seen my error too late, thanks.
But I can't get a line in the legend, just markers?
=2D-=20
Lionel Roubeyrie - lro...@li...
LIMAIR
http://www.limair.asso.fr
From: John H. <jdh...@ac...> - 2006年09月26日 12:36:50
>>>>> "Lionel" == Lionel Roubeyrie <lro...@li...> writes:
 Lionel> Hi all, I have some minor problems with legend, but I
 Lionel> don't find how to figure out: - if the figure contains
 Lionel> only one plot, the text orientation of the legend is
 Lionel> vertical. How can I change this? - when plots are in '-'
 Lionel> style without markers, the lines are not shown in the
 Lionel> legend, I just have text. thanks -- Lionel Roubeyrie -
 Lionel> lro...@li... LIMAIR http://www.limair.asso.fr
Make sure you pass in a list of strings, and not a single string. If
you have just a single string, it interprets it as a list of
characters.
JDH
 s = 'mylabel'
 line, = plot(something)
 legend([line], [s])
Note the comma in "line, = plot(something)" which performs tuple
unpacking of a list of lines. plot returns a list of lines, so you
could also do
 lines = plot(something)
 legend(lines, [s])
but not
 lines = plot(something)
 legend(lines, s)
because then you have a list of lines and a sequence of characters.
JDH
From: Lionel R. <lro...@li...> - 2006年09月26日 08:12:28
Hi all,
I have some minor problems with legend, but I don't find how to figure out:
 - if the figure contains only one plot, the text orientation of the legend is 
vertical. How can I change this?
 - when plots are in '-' style without markers, the lines are not shown in 
the legend, I just have text.
thanks
-- 
Lionel Roubeyrie - lro...@li...
LIMAIR
http://www.limair.asso.fr
From: Kevin H. <kho...@ro...> - 2006年09月25日 11:11:28
I'm using matplotlib 0.87.5. I'm working on an application that has 
an interface that allows the user to change xmin and xmax to focus in 
on portions of the dataset. I'd like the y axis to autoscale each 
time the xmin and/or xmax are changed. I've confirmed that 
autoscale_on is True, but no autoscaling occurs.
What drives the y axis autoscaling? Does it look only at the data 
between xmin and xmax, or does it look at the whole data series? Is 
there a way to make autoscale do what I want, or would I need to 
change the data set each time to only be plotting between xmin and xmax?
Kevin Horton
Ottawa, Canada
From: <lis...@ma...> - 2006年09月24日 18:12:59
I have successfully built and installed matplotlib 0.87.5 on OS X 
10.4, and both the pylab files and the matplotlib directory are in my 
site-packages folder. However, when I try to import matplotlib, 
nothing happens:
ActivePython 2.4.3 Build 11 (ActiveState Software Inc.) based on
Python 2.4.3 (#1, Apr 3 2006, 18:07:14)
[GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> import matplotlib
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
ImportError: No module named matplotlib
 >>> import pylab
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages/pylab.py", line 1, in ?
 from matplotlib.pylab import *
ImportError: No module named matplotlib.pylab
This does not occur with matplotlib from cvs, nor with previous 
versions of matplotlib. What could be the problem here?
Thanks,
--
Christopher Fonnesbeck
+ Atlanta, GA
+ fonnesbeck at mac.com
+ Contact me on AOL IM using email address
From: Evert R. <eve...@gm...> - 2006年09月24日 09:26:36
 Hi all,
I'm fairly new to matplotlib, and so far, I have not found an (easy)
way to plot error bars on a log-log plot. Is there a way to do that
easily (eg through the pylab interface), or do I have set up things
more manually?
Related to that, I'm also looking for a way to neatly produce upper
(or lower) limits on figures, either log-log or normal or a
combination. This is generally a problem in every plotting package,
but perhaps someone has a good pointer to this. Drawing arrows helps
(for example, down-pointing arrows for y-upper limits), but his often
needs to be done separately, as I do now in gnuplot (ie, the arrows
stand just on their own, and are not seen as limits by the plotting
package: for y-upper limits, I need to draw the horizontal error bars
separately, as well as draw the non-limit points separately).
If there's no relatively straightforward way, I'd be inclined to delve
into the pylab.errorbar routine, to try and change that so that's it's
suitable for log-log plots, and accepts limits (by eg supplying None
as an element of the Nx2 numpy array; obviously, limits only work for
asymmetric errorbars). But that may simply not be the best thing to
do, so any pointers to that would also be welcome.
Thanks,
 Evert
From: Russell E. O. <ro...@ce...> - 2006年09月22日 17:39:44
Here are instructions for building a universal matplotlib for MacOS X 
from source. The topic comes up once in awhile and having just fought 
through it, I figured it was best to post instructions. Thanks to 
Charlie Moad and mpsuzuki for their valuable assistance.
1) Install the prerequisites:
1.1) libz is included with MacOS X 10.4. If you ever installed a copy 
yourself, get rid of it or make sure it's universal.
1.2) Install libpng. Get source, unpack and:
- Configure it for a universal build. On a PPC system (this should be 
two lines; you may have to manually unwrap the first line):
$ CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 
-arch ppc" \
 ./configure --disable-dependency-tracking
- On an Intel system use this simpler version:
$ CFLAGS="-arch i386 -arch ppc" \
 ./configure --disable-dependency-tracking
- Build and install as usual:
$ make
$ sudo make install
- If you plan to redistribute matplotlib, delete the dynamic library so 
matplotlib statically links to libpng:
$ sudo rm /usr/local/lib/libpng*.dylib
1.3) Install freetype. Do *NOT* use version 2.2.1; it is broken on MacOS 
X (but fixed in CVS). 2.1.10 works fine. Get source, unpack, and install 
exactly as for libpng except:
- Before building, you may wish to modify 
include/freetype/configure/ftoption.h to enable hinting:
 uncomment #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 perhaps comment out #define TT_CONFIG_OPTION_UNPATENTED_HINTING
- After building, you *MUST* delete the dynamic library. At least for 
version 2.1.10 and 2.2.1 it is *NOT* universal, only the static library 
is universal.
$ sudo rm /usr/local/lib/libfreetype*.dylib
2) Make sure you have a universal python installed, e.g. MacPython from 
<http://pythonmac.org/packages/>
3) Install matplotlib in the usual fashion:
$ python setup.py build
$ sudo python setup.py install
(I didn't try easy_install, but I suspect it works too)
-- Russell
P.S. The instructions for running configure to get a universal binary 
are from Apple Tech Note 2137: 
<http://developer.apple.com/technotes/tn2005/tn2137.html> with the 
correction that LDFLAGS must *NOT* be defined (issue number 4387241 in 
Apple Bug Reporter database). Fortunately it is not necessary, and 
suggesting otherwise is a mistake in the tech note.
If you forget --disable-dependency-tracking you'll get error messages 
saying you have an incompatible set of compiler flags.
From: John H. <jdh...@ac...> - 2006年09月22日 13:48:03
>>>>> "fred" == fred <fr...@gm...> writes:
 fred> Hi the list, Is it possible to have some curves not legended
 fred> ?
ax.plot(x,y,label='_nolegend_')
Help on function legend in module matplotlib.pylab:
legend(*args, **kwargs)
 LEGEND(*args, **kwargs)
 Place a legend on the current axes at location loc. Labels are a
 sequence of strings and loc can be a string or an integer
 specifying the legend location
 USAGE:
 Make a legend with existing lines
 >>> legend()
 legend by itself will try and build a legend using the label
 property of the lines/patches/collections. You can set the
 label of a line by doing plot(x, y, label='my data') or
 line.set_label('mydata'). If label is set to '_nolegend_', the
 item will not be shown in legend.
JDH
From: giandomenico b. <gia...@gm...> - 2006年09月22日 12:53:07
Hi to all,
I'm writing a web application with zope+python. I've made a first try to
insert a graph using zope external method an following the instruction
reported in this sample:
http://www.scipy.org/Cookbook/Matplotlib/Matplotlib_and_Zope
I have some problem with the imports; zope tell me:
 Error Type: ImportError
 Error Value: cannot import name FigureCanvasAgg
This is due to the instruction 7:
 1 import matplotlib
 2 matplotlib.use('Agg')
 3 from pylab import *
 4 from os import *
 5 from StringIO import StringIO
 6 from PIL import Image as PILImage
 7 from matplotlib.backends.backend_agg import FigureCanvasAgg
[...]
The path of the file backends_agg.py is correct. Have you got any
suggestion.
Thanks.
From: fred <fr...@gm...> - 2006年09月22日 10:49:20
Hi the list,
Is it possible to have some curves not legended ?
A sample example is better :
http://fredantispam.free.fr/foo.png
I whish the pointed curves to be not displayed in the legend box.
How can I do this ?
Cheers,
--=20
=AB Python, c'est un peu comme la ba=EFonnette en 14, faut toujours sorti=
r avec,
et pas h=E9siter d'en mettre un coup en cas de besoin. =BB
J.-Ph. D.
2 messages has been excluded from this view by a project administrator.

Showing results of 277

<< < 1 2 3 4 .. 12 > >> (Page 2 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 によって変換されたページ (->オリジナル) /