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


Showing 16 results of 16

From: Erik C. <er...@ce...> - 2008年01月10日 22:07:42
Hi!
I'm trying to make a clickable plot_date() plot (using the Pylons 
framework). What I need is the pixel coordinates of the data points I 
give to plot_date(), but the trans.seq_x_y() function doesn't like Datetime:
 >> xcoords, ycoords = trans.seq_x_y(x, y)
 float() argument must be a string or a number
How can I get the pixel coordinates?
Here are the relevant parts of my code (x is Datetime, y is float):
 figure = pylab.figure(figsize=(6,4), dpi=100, frameon=False)
 ax = figure.add_subplot(111)
 # quick simple scatter plot
 ax.plot_date(x, y, 'ro')
 # Convert the data set points into screen space coordinates
 trans = ax.get_transform()
 xcoords, ycoords = trans.seq_x_y(x, y)
Thanks,
Erik
From: Darren D. <dar...@co...> - 2008年01月10日 20:43:39
On Wednesday 09 January 2008 10:15:54 am Francesco Pretto wrote:
> 2008年1月9日, Darren Dale <dar...@co...>:
> > setup.py attempts to select the appropriate backend for you, based on
> > what backends were available at build time. That selection is written
> > into the default matplotlibrc file, which resides in
> > site-packages/matplotlib/mpl-data. If matplotlib finds another
> > matplotlibrc file (for example, in the current working directory, in
> > $HOME/.matplotlib, etc), then it will use those settings instead. I would
> > guess that is the source of the problem.
>
> No, the problem is the default installed matplotlibrc, that is not
> different from the one present in the source tree and has the default
> selection:
>
> backend : TkAgg
>
> Now, i don't know if the build script is trying to modify it according
> user selection or compile-time backend detection, but I'm wondering
> why the same problem wasn't happening on linux, where I tipically
> never install Tk runtime.
>
> However, for me the problem is solved, but if there's a matplotlib
> windows dev listening, here is my experience; first, i removed the
> already installed "lib/site-packages/matplotlib/mpl-data/matplotlibrc"
> . Afer, I went for clean compiling with a setup.cfg with these
> configurations:
>
> gtk = True
> gtkagg = False
> tkagg = False
> wxagg = False
> backend = GTK
>
> Eventually, "python setup.py install" write again a
> "site-packages/matplotlib/mpl-data/matplotlibrc" which still have:
>
> backend : TkAgg
>
> If this shouldn't happen, well, consider this a bug report :D
I think this is fixed. Please update from svn and try again.
Darren
From: Dan K. <ka...@tx...> - 2008年01月10日 17:59:57
Just to follow up:
Mike was indeed correct. I never found the qt4 demos but I did find some
simple pyqt4 sample code.
http://zetcode.com/tutorials/pyqt4/firstprograms/
The first example on this page causes the same problem. It really isn't a
color inversion. It seems to be more of a messed up color palette. Some
colors remain unchanged, other colors are wildly different. White does go
to black though which is the most notable change.
So this is a PyQt (or Qt?) problem. As such, I'll stop cluttering this list
and move my investigation elsewhere.
Thanks for your help, all.
-Dan
-----Original Message-----
From: Michael Droettboom [mailto:md...@st...] 
Sent: Wednesday, January 09, 2008 2:35 PM
To: Dan Karipides
Cc: 'Matplotlib Users'
Subject: Re: [Matplotlib-users] screen colors invert with matplotlib
I wonder if the problem exhibits itself in any other pyqt4 apps (such as 
the demo apps)... In that case, I would take your question to the pyqt 
list. Otherwise, we'll want to track down what specifically matplotlib 
is doing that causes this.
Cheers,
Mike
From: Michael D. <md...@st...> - 2008年01月10日 16:40:33
You're right. It's a bug. The parser (when it was re-written) was 
changed to not accept '[' as a literal symbol, since it is meaningful in 
certain situations. This turned out to be overly cautious. This is 
fixed in svn r4854.
Manuel Metz wrote:
> Michael Droettboom wrote:
>> You need to escape the [:
>>
>> mpl_pp.xlabel(r"$\[$")
>>
>> [] and {} have special meanings in math syntax, so to use them 
>> "literally", they need to be escaped.
> 
> Really? Note that Matthias had text.usetex=False.
> I tried various configurations:
> 
> text.usetex=True
> 
> xlabel( "$[$") okay
> xlabel(r"$\[$") okay
> xlabel( "$\[$") no error, but also no label displayed
I'm surprised by this. Those last two strings should be identical. 
Maybe Python 2.5 works differently from whatever you're running.
> text.usetex=False
> 
> xlabel("$[$") failed with
> Expected end of text (at char 0), (line:1, col:1)
> 
> xlabel(r"$\[$")
> xlabel( "$\[$") no error, but displays a star symbol
> 
> In the last two cases I got a warning
> 
> mathtext.py:722: MathTextWarning: Unrecognized symbol '\['. Substituting 
> with a dummy symbol.
> % sym.encode('ascii', 'backslashreplace'), MathTextWarning)
Cheers,
Mike
>> Matthias Michler wrote:
>>> Hello list,
>>>
>>> the little example below leads to an error on my system (output is 
>>> attached).
>>> I used this some time ago and it worked. Now I'm using the release 
>>> 0.91.2.
>>> Is there a reason to use rectangular brackets not in mathtext?
>>> (same problem occur with '{' for me.)
>>>
>>> best regards and thanks in advance for any help,
>>> Matthias
>>> ------------------------------------------------------------------------------------------------- 
>>>
>>> import matplotlib.pyplot as mpl_pp
>>> mpl_pp.axes()
>>> mpl_pp.xlabel("$[$")
>>> mpl_pp.show()
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> ------------------------------------------------------------------------- 
>>>
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace 
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> 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: Manuel M. <mm...@as...> - 2008年01月10日 16:00:49
Michael Droettboom wrote:
> You need to escape the [:
> 
> mpl_pp.xlabel(r"$\[$")
> 
> [] and {} have special meanings in math syntax, so to use them 
> "literally", they need to be escaped.
Really? Note that Matthias had text.usetex=False.
I tried various configurations:
text.usetex=True
 xlabel( "$[$") okay
 xlabel(r"$\[$") okay
 xlabel( "$\[$") no error, but also no label displayed
text.usetex=False
 xlabel("$[$") failed with
 Expected end of text (at char 0), (line:1, col:1)
 xlabel(r"$\[$")
 xlabel( "$\[$") no error, but displays a star symbol
In the last two cases I got a warning
mathtext.py:722: MathTextWarning: Unrecognized symbol '\['. Substituting 
with a dummy symbol.
 % sym.encode('ascii', 'backslashreplace'), MathTextWarning)
Cheers,
Manuel
> Cheers,
> Mike
> 
> Matthias Michler wrote:
>> Hello list,
>>
>> the little example below leads to an error on my system (output is attached).
>> I used this some time ago and it worked. Now I'm using the release 0.91.2.
>> Is there a reason to use rectangular brackets not in mathtext?
>> (same problem occur with '{' for me.)
>>
>> best regards and thanks in advance for any help,
>> Matthias
>> -------------------------------------------------------------------------------------------------
>> import matplotlib.pyplot as mpl_pp
>> mpl_pp.axes()
>> mpl_pp.xlabel("$[$")
>> mpl_pp.show()
>>
>>
>> ------------------------------------------------------------------------
>>
>> -------------------------------------------------------------------------
>> Check out the new SourceForge.net Marketplace.
>> It's the best place to buy or sell services for
>> just about anything Open Source.
>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
From: Michael D. <md...@st...> - 2008年01月10日 15:48:14
You need to escape the [:
 mpl_pp.xlabel(r"$\[$")
[] and {} have special meanings in math syntax, so to use them 
"literally", they need to be escaped.
Cheers,
Mike
Matthias Michler wrote:
> Hello list,
> 
> the little example below leads to an error on my system (output is attached).
> I used this some time ago and it worked. Now I'm using the release 0.91.2.
> Is there a reason to use rectangular brackets not in mathtext?
> (same problem occur with '{' for me.)
> 
> best regards and thanks in advance for any help,
> Matthias
> -------------------------------------------------------------------------------------------------
> import matplotlib.pyplot as mpl_pp
> mpl_pp.axes()
> mpl_pp.xlabel("$[$")
> mpl_pp.show()
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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: Matthias M. <Mat...@gm...> - 2008年01月10日 15:21:16
Hello list,
the little example below leads to an error on my system (output is attached).
I used this some time ago and it worked. Now I'm using the release 0.91.2.
Is there a reason to use rectangular brackets not in mathtext?
(same problem occur with '{' for me.)
best regards and thanks in advance for any help,
Matthias
-------------------------------------------------------------------------------------------------
import matplotlib.pyplot as mpl_pp
mpl_pp.axes()
mpl_pp.xlabel("$[$")
mpl_pp.show()
Hi Matplotlib users,
I'm experiencing some problems when closing a figure (I'm using
matplotlib 0.91.0).
the function is working correctly when invoked inside the module where
it is defined:
from pylab import *
def test():
 t = arange(0.0, 1.0+0.01, 0.01)
 s = cos(2*2*pi*t)
 plot(t, s, '-', lw=2)
 show()
 print 'after show'
if __name__ == '__main__':
 print test()
now if I call test() from another module, the figure closes but show()
does not return ('after show' does not get printed) so the execution is
stuck.
Can somebody shade some light here, I'm really missing something...
Thanks a lot
Henry
From: Michael D. <md...@st...> - 2008年01月10日 13:27:45
Attachments: offset_labels.patch
Sorry I didn't notice this right away. This is actually a bug. I made 
a change so the offset (in scientific notation) is written in the same 
font as the other tick values, which unfortunately broke with the 
default fonts.
I have attached a patch against 0.91.2. This will make it into the next 
0.91.x bugfix release, but that may be a while.
Cheers,
Mike
Matthias Michler wrote:
> Hello Mike, Hello list,
> 
> thanks for your reply.
> 
> On Wednesday 09 January 2008 17:58, Michael Droettboom wrote:
>> The default mathtext font should have the "times" symbol. Are you
>> making any other changes that would affect the selection of mathtext
>> fonts? 
> I don't think that I changed anything. I only run the script attached in the 
> last email. 
>> (Can you please attach a copy of your matplotlibrc file?) If 
>> that looks ok, perhaps it isn't finding the math fonts correctly.
> I attached the file.
>> There 
>> are a multitude of reasons that could be happening. It is sometimes
>> helpful to set "verbose.level" to "debug-annoying" and then look at the
>> logs to see what might be going on. Also, you could try deleting the
>> fonts cache in ~/.matplotlib/fontManager.cache to force it to regenerate.
> 
> I deleted the ~/.matplotlib/fontManager.cache and run again my script. The 
> output with "verbose.level : debug-annoying" is attached, but I don't 
> understand what I'm doing wrong. 
> Maybe my matplotlibrc is to old to be used with the last improvements, 
> although I can't see any substantial differences.
> 
> Thanks in advance for any further suggestions.
> best regards,
> Matthias
> 
>> Cheers,
>> Mike
>>
>> Matthias Michler wrote:
>>> Hello list,
>>>
>>> the little example below seems to fail, can anybody help me?
>>> I'm on Debian using the release 0.91.2.
>>>
>>> best regards and thanks in advance for any hints,
>>> Matthias
>>>
>>> -------------------------------------------------------------------------
>>> ------------------ from matplotlib.ticker import ScalarFormatter
>>> from matplotlib.pyplot import *
>>>
>>> ax = axes()
>>> axis([0.0, 10**-7, 0, 10**-7])
>>>
>>> ax.yaxis.set_major_formatter(ScalarFormatter(useMathText=True))
>>>
>>> show()
>>> -------------------------------------------------------------------------
>>> ----------------------- error message:
>>> /scratch/michler/SOFT/lib/python2.4/site-packages/matplotlib/mathtext.py:
>>> 722: MathTextWarning: Unrecognized symbol '\times'. Substituting with a
>>> dummy symbol.
>>> % sym.encode('ascii', 'backslashreplace'), MathTextWarning)
>>>
>>>
>>> the string '\times' is due to line
>>> sciNotStr = r'{\times}'+self.format_data(10**self.orderOfMagnitude)
>>> in function ScalarFormatter.get_offset
>>>
>>> -------------------------------------------------------------------------
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketpl
>>> ace _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>> ------------------------------------------------------------------------
>>>
>>> -------------------------------------------------------------------------
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> 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: Manuel M. <mm...@as...> - 2008年01月10日 11:28:14
Gio...@ma... wrote:
> matalb has a gscatter command that work like this"
> 
> GSCATTER(X,Y,G) creates a scatter plot of the vectors X and Y
> grouped by G. Points with the same value of G are shown with
> the same color and marker. G is a grouping variable defined as
> a vector, a cell array of strings, or a string matrix, and it
> must have the same number of rows as X and Y. Alternatively
> G can be a cell array of grouping variables (such as {G1 G2 G3})
> to group the values in X by each unique combination of grouping
> variable values.
> 
> GSCATTER(X,Y,G,CLR,SYM,SIZ) specifies the colors, markers, and
> size to use. CLR is either a string of color specifications or
> a three-column matrix of color specifications. SYM is a string
> of marker specifications. Type "help plot" for more information.
> For example, if SYM='o+x', the first group will be plotted with a
> circle, the second with plus, and the third with x. SIZ is a
> marker size to use for all plots. By default, the marker is '.'.
> 
> GSCATTER(X,Y,G,CLR,SYM,SIZ,DOLEG) lets you control whether legends
> are created. Set DOLEG to 'on' (default) or 'off'.
> 
> GSCATTER(X,Y,G,CLR,SYM,SIZ,DOLEG,XNAM,YNAM) specifies XNAM and
> YNAM as the names of the X and Y variables. Each must be a
> character string. If you omit XNAM and YNAM, GSCATTER attempts to
> determine the names of the variables passed in as the first and
> second arguments.
> 
> H = GSCATTER(...) returns an array of handles to the objects
> created.
> 
> Example: Scatter plot of car data coded by country.
> load carsmall
> gscatter(Weight, MPG, Origin)
> 
> See also grpstats, grp2idx."
> 
> it's very very useful instead of doing multiple scatter and merging them 
> togheter. I think it can be easily implemented but i don't know how much 
> request there is for it.
> 
> 
> Giorgio
> 
I don't think something like that work in matplotlib with scatter for 
the marker parameter. But it's possible to use an array of sizes and 
colors, ie.
 s = [20,30,40]
 x = arange(3)
 y = arange(3)
 scatter(x,y,s=s)
See scatter doc string:
Arguments s and c can also be given as kwargs; this is encouraged
 for readability.
 s is a size in points^2. It is a scalar
 or an array of the same length as x and y.
 c is a color and can be a single color format string,
 or a sequence of color specifications of length N,
 or a sequence of N numbers to be mapped to colors
 using the cmap and norm specified via kwargs (see below).
 Note that c should not be a single numeric RGB or RGBA
 sequence because that is indistinguishable from an array
 of values to be colormapped. c can be a 2-D array in which
 the rows are RGB or RGBA, however.
Manuel
From: Manuel M. <mm...@as...> - 2008年01月10日 11:15:59
Gio...@ma... wrote:
> Thanks ! i didn't know that.
> Do you know also if it is possible to have something similar to a scatter 
> group ?
Sorry, but what do you mean by "scatter group" ?
> Thanks
> Giorgio
From: Matthias M. <Mat...@gm...> - 2008年01月10日 10:05:17
Hello Mike, Hello list,
thanks for your reply.
On Wednesday 09 January 2008 17:58, Michael Droettboom wrote:
> The default mathtext font should have the "times" symbol. Are you
> making any other changes that would affect the selection of mathtext
> fonts? 
I don't think that I changed anything. I only run the script attached in the 
last email. 
> (Can you please attach a copy of your matplotlibrc file?) If 
> that looks ok, perhaps it isn't finding the math fonts correctly.
I attached the file.
> There 
> are a multitude of reasons that could be happening. It is sometimes
> helpful to set "verbose.level" to "debug-annoying" and then look at the
> logs to see what might be going on. Also, you could try deleting the
> fonts cache in ~/.matplotlib/fontManager.cache to force it to regenerate.
I deleted the ~/.matplotlib/fontManager.cache and run again my script. The 
output with "verbose.level : debug-annoying" is attached, but I don't 
understand what I'm doing wrong. 
Maybe my matplotlibrc is to old to be used with the last improvements, 
although I can't see any substantial differences.
Thanks in advance for any further suggestions.
best regards,
Matthias
> Cheers,
> Mike
>
> Matthias Michler wrote:
> > Hello list,
> >
> > the little example below seems to fail, can anybody help me?
> > I'm on Debian using the release 0.91.2.
> >
> > best regards and thanks in advance for any hints,
> > Matthias
> >
> > -------------------------------------------------------------------------
> >------------------ from matplotlib.ticker import ScalarFormatter
> > from matplotlib.pyplot import *
> >
> > ax = axes()
> > axis([0.0, 10**-7, 0, 10**-7])
> >
> > ax.yaxis.set_major_formatter(ScalarFormatter(useMathText=True))
> >
> > show()
> > -------------------------------------------------------------------------
> >----------------------- error message:
> > /scratch/michler/SOFT/lib/python2.4/site-packages/matplotlib/mathtext.py:
> >722: MathTextWarning: Unrecognized symbol '\times'. Substituting with a
> > dummy symbol.
> > % sym.encode('ascii', 'backslashreplace'), MathTextWarning)
> >
> >
> > the string '\times' is due to line
> > sciNotStr = r'{\times}'+self.format_data(10**self.orderOfMagnitude)
> > in function ScalarFormatter.get_offset
> >
> > -------------------------------------------------------------------------
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketpl
> >ace _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Manuel M. <mm...@as...> - 2008年01月10日 09:22:36
Hi,
you are limited to 10 "named" symbols. But you can use much more symbols 
with scatter !!! Have a look at examples/scatter_star_symbols.py.
You can use:
 pylab.scatter(x,y,marker=(5,0))
produces a 5-sided regular polygon.
 pylab.scatter(x,y,marker=(5,1))
produces a starlike polygon
 pylab.scatter(x,y,marker=(5,2))
produces an asterisk.
You can even define your own symbols by defining the vertices of a polygon:
 verts = zip( [x1,x2,x3...], [y1,y2,y3,...])
 pylab.scatter(x,y,marker=(verts,0))
Note that there is a third, optional parameter for the marker keyword, 
ie. marker=(5,0,math.pi/4.) that defines the rotation of a symbol.
Manuel
Gio...@ma... wrote:
> I was wondering if there exist a functino like Matlab (TM) gscatter in 
> matplot lib but I coulnd't find one.
> I also seen that in matplot lib we are "limited" to 10 symbols in scatter 
> while in MT we have 13 (and I have to plot 12 :)))
> is it possible to implement the new function (gscatter) and other symbols 
> ;)
> thanks
> Giorgio
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: <Gio...@ma...> - 2008年01月10日 09:02:19
I was wondering if there exist a functino like Matlab (TM) gscatter in 
matplot lib but I coulnd't find one.
I also seen that in matplot lib we are "limited" to 10 symbols in scatter 
while in MT we have 13 (and I have to plot 12 :)))
is it possible to implement the new function (gscatter) and other symbols 
;)
thanks
Giorgio
From: Darren D. <dar...@co...> - 2008年01月10日 02:19:34
On Wednesday 09 January 2008 8:50:46 pm Charlie Moad wrote:
> On Jan 9, 2008 10:35 AM, Darren Dale <dar...@co...> wrote:
> > On Wednesday 09 January 2008 10:15:54 am Francesco Pretto wrote:
> > > 2008年1月9日, Darren Dale <dar...@co...>:
> > > > setup.py attempts to select the appropriate backend for you, based on
> > > > what backends were available at build time. That selection is written
> > > > into the default matplotlibrc file, which resides in
> > > > site-packages/matplotlib/mpl-data. If matplotlib finds another
> > > > matplotlibrc file (for example, in the current working directory, in
> > > > $HOME/.matplotlib, etc), then it will use those settings instead. I
> > > > would guess that is the source of the problem.
> > >
> > > No, the problem is the default installed matplotlibrc, that is not
> > > different from the one present in the source tree and has the default
> > > selection:
> > >
> > > backend : TkAgg
> > >
> > > Now, i don't know if the build script is trying to modify it according
> > > user selection or compile-time backend detection, but I'm wondering
> > > why the same problem wasn't happening on linux, where I tipically
> > > never install Tk runtime.
> > >
> > > However, for me the problem is solved, but if there's a matplotlib
> > > windows dev listening, here is my experience; first, i removed the
> > > already installed "lib/site-packages/matplotlib/mpl-data/matplotlibrc"
> > > . Afer, I went for clean compiling with a setup.cfg with these
> > > configurations:
> > >
> > > gtk = True
> > > gtkagg = False
> > > tkagg = False
> > > wxagg = False
> > > backend = GTK
> > >
> > > Eventually, "python setup.py install" write again a
> > > "site-packages/matplotlib/mpl-data/matplotlibrc" which still have:
> > >
> > > backend : TkAgg
> > >
> > > If this shouldn't happen, well, consider this a bug report :D
> >
> > Oh, I see. Look at line 238 in setup.py. Maybe we don't need that check
> > for sys.platform anymore, now that we have setup.cfg. I think that check
> > was in there for the benefit of building the windows installers, which we
> > wanted to default to tkagg.
> >
> > I think it would be best to use a setup.cfg to set the numerix and
> > backends when building the windows installers. Charlie, does that sound
> > alright?
>
> That's fine. I didn't use setup.cfg for the latest binaries though.
That is no problem. If you had, the binaries would not be any different than 
they are now. I'll make the change tomorrow, and send you the appropriate 
setup.cfg for building the windows installer.
Darren
From: Charlie M. <cw...@gm...> - 2008年01月10日 01:50:50
On Jan 9, 2008 10:35 AM, Darren Dale <dar...@co...> wrote:
>
> On Wednesday 09 January 2008 10:15:54 am Francesco Pretto wrote:
> > 2008年1月9日, Darren Dale <dar...@co...>:
> > > setup.py attempts to select the appropriate backend for you, based on
> > > what backends were available at build time. That selection is written
> > > into the default matplotlibrc file, which resides in
> > > site-packages/matplotlib/mpl-data. If matplotlib finds another
> > > matplotlibrc file (for example, in the current working directory, in
> > > $HOME/.matplotlib, etc), then it will use those settings instead. I would
> > > guess that is the source of the problem.
> >
> > No, the problem is the default installed matplotlibrc, that is not
> > different from the one present in the source tree and has the default
> > selection:
> >
> > backend : TkAgg
> >
> > Now, i don't know if the build script is trying to modify it according
> > user selection or compile-time backend detection, but I'm wondering
> > why the same problem wasn't happening on linux, where I tipically
> > never install Tk runtime.
> >
> > However, for me the problem is solved, but if there's a matplotlib
> > windows dev listening, here is my experience; first, i removed the
> > already installed "lib/site-packages/matplotlib/mpl-data/matplotlibrc"
> > . Afer, I went for clean compiling with a setup.cfg with these
> > configurations:
> >
> > gtk = True
> > gtkagg = False
> > tkagg = False
> > wxagg = False
> > backend = GTK
> >
> > Eventually, "python setup.py install" write again a
> > "site-packages/matplotlib/mpl-data/matplotlibrc" which still have:
> >
> > backend : TkAgg
> >
> > If this shouldn't happen, well, consider this a bug report :D
>
> Oh, I see. Look at line 238 in setup.py. Maybe we don't need that check for
> sys.platform anymore, now that we have setup.cfg. I think that check was in
> there for the benefit of building the windows installers, which we wanted to
> default to tkagg.
>
> I think it would be best to use a setup.cfg to set the numerix and backends
> when building the windows installers. Charlie, does that sound alright?
That's fine. I didn't use setup.cfg for the latest binaries though.

Showing 16 results of 16

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