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






Showing results of 346

1 2 3 .. 14 > >> (Page 1 of 14)
From: Eric F. <ef...@ha...> - 2010年01月31日 23:22:36
per freem wrote:
> hi all,
> 
> two quick questions about labels. first, is there a way to make
> subscripts/superscripts *without* using TeX in labels? For example, I
> use helvetica in all my labels and I want to plot something like:
> plt.xlabel("log10") where "10" is a subscript of "log", but without
> doing: plt.xlabel(r"$\log_{10}$"), since that will use LaTeX fonts
> instead of my helvetica font.
See the mathtext options in matplotlibrc.template. It looks like what 
you need is
matplotlib.rc('mathtext', fontset='stixsans')
maybe with the additional kwarg, default='regular', if you don't want 
italics.
All this is with text.usetex=False (the default).
> 
> second question, when using TeX, I tried the following TeX command in labels:
> plt.annotate(r"\frac{\sigma}{\sqrt{\mu}}", ....) but it complains that
> "not all arguments converted during string formatting" -- but it seems
> like correct TeX to me. if I try r"\frac{1}{2}" then it works, but
> using \sigma and \sqrt inside breaks it.. any idea how to fix this?
This is working for me with usetex=False or True but including dollar 
signs to signal the use of mathtext (or TeX) parsing.
Eric
From: Gökhan S. <gok...@gm...> - 2010年01月31日 22:31:49
On Sun, Jan 31, 2010 at 4:21 PM, per freem <per...@gm...> wrote:
> hi all,
>
> two quick questions about labels. first, is there a way to make
> subscripts/superscripts *without* using TeX in labels? For example, I
> use helvetica in all my labels and I want to plot something like:
> plt.xlabel("log10") where "10" is a subscript of "log", but without
> doing: plt.xlabel(r"$\log_{10}$"), since that will use LaTeX fonts
> instead of my helvetica font.
>
Unicode strings might be the answer for this. Though needs someone's
confirmation.
>
> second question, when using TeX, I tried the following TeX command in
> labels:
> plt.annotate(r"\frac{\sigma}{\sqrt{\mu}}", ....) but it complains that
> "not all arguments converted during string formatting" -- but it seems
> like correct TeX to me. if I try r"\frac{1}{2}" then it works, but
> using \sigma and \sqrt inside breaks it.. any idea how to fix this?
>
Have you forgotten "$" ? The following works correctly in my system.
plt.xlabel(r"$\frac{\sigma}{\sqrt{\mu}}$")
>
> thanks.
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-- 
Gökhan
From: per f. <per...@gm...> - 2010年01月31日 22:21:41
hi all,
two quick questions about labels. first, is there a way to make
subscripts/superscripts *without* using TeX in labels? For example, I
use helvetica in all my labels and I want to plot something like:
plt.xlabel("log10") where "10" is a subscript of "log", but without
doing: plt.xlabel(r"$\log_{10}$"), since that will use LaTeX fonts
instead of my helvetica font.
second question, when using TeX, I tried the following TeX command in labels:
plt.annotate(r"\frac{\sigma}{\sqrt{\mu}}", ....) but it complains that
"not all arguments converted during string formatting" -- but it seems
like correct TeX to me. if I try r"\frac{1}{2}" then it works, but
using \sigma and \sqrt inside breaks it.. any idea how to fix this?
thanks.
From: photonicsphan <ema...@ya...> - 2010年01月31日 22:18:42
Hello,
I have matplotlib widget set up in a PyQt 4 program. The axis is set for
auto scaling. I'm using the following command to determine the upper y
boundary:
self.plotWidget.canvas.ax.axis()[3]
where plotWidget is the name of the widget in my program. I get a number
from this command just fine, but it doesn't always agree with the actual
axis on the plot window. For instance, after plotting a curve with a
maximum y-value of 0.125, the command above gives me an upper y-limit of
0.14. However, the plot window goes up to y=0.16. Sometimes things work
out correctly, but they call above and the plot window do not typically
agree. 
I really need the plot window to match what comes from this call to axis(). 
Can anyone offer any suggestions on what might be going wrong?
Thanks,
Steve
-- 
View this message in context: http://old.nabble.com/Values-returned-by-axis%28%29-do-not-match-the-actual-axis-in-the-plot-window-tp27397234p27397234.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
b9o2jnbm tsd71eam wrote:
> Hi!
> 
> I want to create a histogram with the step scale and I am finding 
> an inconstancy when using a log scale. I have a very simple example 
> without a log scale which works just as expected creating alternating 
> bins with value one and value zero.
> 
> from pylab import *
> hist([0.5,2.5,4.5],bins=[0,1,2,3,4,5,6],histtype='step',log=False)
> ylim(0.1,1.1)
> show()
> 
> When I change the keyword log=False to log=True, the line connecting the 
> bins with value one to the bins with value zero disappear. Is there any 
> way I can get them to reaper? Is this a bug that should be fixed or is 
> there a workaround?
It works for me using svn, and the problem sounds familiar, so I think 
this is a bug that was fixed.
Eric
From: Ernest A. <ead...@gm...> - 2010年01月31日 16:58:43
Hi,
I would like to add some text relative to the legend,
let's say below it, and I don't know how to get the legend
coordinates so I can pass them to the text() method.
Does anyone know how to do it?
Alternatively, if there was a way to add text inside the
legend itself, it would also do the trick.
Thank you in advance.
Ernest
From: <kc1...@ya...> - 2010年01月31日 16:06:40
BTW: I tried to use set_position to change the position of the axes label as suggested by previous posting. No effect. 
----- Original Message ----
> > Hello,
> > 
> > I am creating a plot with multiple y-axis (up to 6) and twinx 
> works pretty well. The problem is that there are too much wasted spaces used up 
> by the axes. Since I have multiple axes, it cuts into the amount of space 
> available for the plot area. I need to know how I can squeeze some spaces out of 
> the standard axes. First thing I discovered was that I can rotate the tick 
> labels to vertical by:
> > 
> > plt.setp(ax.major_ticklabels, rotation="vertical")
> > 
> > where ax is my y-axis. But then:
> > 
> > (1) How to reduce the space between the tick and the axes label?
> > 
> > First I tried to place the label on top but couldn't get that to work. Then I 
> tried to change the position property of the axis label object and that have no 
> effect. So, can somebody please tell me how I can do these 2 things?
> > 
> > (2) How to avoid overlapping tick labels?
> > 
> > With the way the standard x and y axis are drawn, after I do a vertical rotate 
> of the y tick labels, the first y tick label overlaps with the last x tick label 
> since they are both center aligned. Is there any way to change the alignment of 
> only the first and last tick labels of an axes (while keeping the rest center 
> aligned)?
> > 
> > Thanks,
> > 
> 
> 
 --
John Henry
From: John S. <sla...@gm...> - 2010年01月31日 07:42:55
Am trying to climb the AIPY mountain and as pre-reqs am trying to get
basemap installed. On Ubuntu 9.10 and have Python 2.6.4 and setuptools
for easy_install. 
Using Synaptic I have installed MPL 0.99.0 and, using the installation
instructions for 'other platforms' Have installed GEOS and libgeos_c is
in /usr/lib and geos_c.h in /usr/include so have set GEOS_DIR to /usr
and untar-ed basemap-0.99.4.tar.gz (could not find 0.99.5 - speaks to my
expertise) in a folder in /usr/share.
CD to basemap-0.99.4 and ran the usual:
python setup.py install
and got screeds of errors. The last ones remaining in my terminal window
are:
src/_proj.c:3156: warning: (near initialization for
‘__pyx_string_tab[36]’)
src/_proj.c:3156: warning: excess elements in struct initializer
src/_proj.c:3156: warning: (near initialization for
‘__pyx_string_tab[36]’)
src/_proj.c:3156: warning: excess elements in struct initializer
src/_proj.c:3156: warning: (near initialization for
‘__pyx_string_tab[36]’)
src/_proj.c:3156: warning: excess elements in struct initializer
src/_proj.c:3156: warning: (near initialization for
‘__pyx_string_tab[36]’)
src/_proj.c:3156: warning: excess elements in struct initializer
src/_proj.c:3156: warning: (near initialization for
‘__pyx_string_tab[36]’)
src/_proj.c:3157: warning: excess elements in struct initializer
src/_proj.c:3157: warning: (near initialization for
‘__pyx_string_tab[37]’)
src/_proj.c:3157: warning: excess elements in struct initializer
src/_proj.c:3157: warning: (near initialization for
‘__pyx_string_tab[37]’)
src/_proj.c:3157: warning: excess elements in struct initializer
src/_proj.c:3157: warning: (near initialization for
‘__pyx_string_tab[37]’)
src/_proj.c:3157: warning: excess elements in struct initializer
src/_proj.c:3157: warning: (near initialization for
‘__pyx_string_tab[37]’)
src/_proj.c:3157: warning: excess elements in struct initializer
src/_proj.c:3157: warning: (near initialization for
‘__pyx_string_tab[37]’)
src/_proj.c:3157: warning: excess elements in struct initializer
src/_proj.c:3157: warning: (near initialization for
‘__pyx_string_tab[37]’)
src/_proj.c: In function ‘__Pyx_InitCachedBuiltins’:
src/_proj.c:3160: error: ‘__pyx_builtin_RuntimeError’ undeclared (first
use in this function)
src/_proj.c:3160: warning: implicit declaration of function
‘__Pyx_GetName’
src/_proj.c:3160: error: ‘__pyx_b’ undeclared (first use in this
function)
src/_proj.c: In function ‘__Pyx_InitGlobals’:
src/_proj.c:3167: error: ‘__pyx_int_0’ undeclared (first use in this
function)
src/_proj.c:3167: warning: implicit declaration of function
‘PyInt_FromLong’
src/_proj.c: At top level:
src/_proj.c:3175: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘init_proj’
src/_proj.c:3176: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘init_proj’
src/_proj.c:3441: error: expected declaration specifiers or ‘...’ before
‘PyObject’
src/_proj.c: In function ‘__Pyx_RaiseDoubleKeywordsError’:
src/_proj.c:3443: error: ‘PyExc_TypeError’ undeclared (first use in this
function)
src/_proj.c:3448: warning: implicit declaration of function
‘PyString_AS_STRING’
src/_proj.c:3448: error: ‘kw_name’ undeclared (first use in this
function)
src/_proj.c: In function ‘__Pyx_RaiseArgtupleInvalid’:
src/_proj.c:3473: error: ‘PyExc_TypeError’ undeclared (first use in this
function)
src/_proj.c: At top level:
src/_proj.c:3483: error: expected ‘)’ before ‘*’ token
src/_proj.c:3561: error: expected ‘)’ before ‘*’ token
src/_proj.c:3581: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/_proj.c:3614: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/_proj.c:3622: error: expected ‘)’ before ‘*’ token
src/_proj.c:3686: error: expected ‘)’ before ‘*’ token
src/_proj.c:3718: error: expected ‘)’ before ‘*’ token
src/_proj.c:3735: error: expected ‘)’ before ‘*’ token
src/_proj.c:3755: error: expected ‘)’ before ‘*’ token
src/_proj.c:3775: error: expected ‘)’ before ‘*’ token
src/_proj.c:3795: error: expected ‘)’ before ‘*’ token
src/_proj.c:3810: error: expected ‘)’ before ‘*’ token
src/_proj.c:3825: error: expected ‘)’ before ‘*’ token
src/_proj.c:3840: error: expected ‘)’ before ‘*’ token
src/_proj.c:3855: error: expected ‘)’ before ‘*’ token
src/_proj.c:3870: error: expected ‘)’ before ‘*’ token
src/_proj.c:3885: error: expected ‘)’ before ‘*’ token
src/_proj.c:3914: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘__Pyx_PyInt_AsUnsignedLongLong’
src/_proj.c:3943: error: expected ‘)’ before ‘*’ token
src/_proj.c:3962: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘__Pyx_PyInt_AsLongLong’
src/_proj.c:3981: error: expected ‘)’ before ‘*’ token
src/_proj.c:4000: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘__Pyx_PyInt_AsSignedLongLong’
src/_proj.c:4021: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/_proj.c:4067: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/_proj.c:4087:21: error: compile.h: No such file or directory
src/_proj.c:4088:25: error: frameobject.h: No such file or directory
src/_proj.c:4089:23: error: traceback.h: No such file or directory
src/_proj.c: In function ‘__Pyx_AddTraceback’:
src/_proj.c:4092: error: ‘PyObject’ undeclared (first use in this
function)
src/_proj.c:4092: error: ‘py_srcfile’ undeclared (first use in this
function)
src/_proj.c:4093: error: ‘py_funcname’ undeclared (first use in this
function)
src/_proj.c:4094: error: ‘py_globals’ undeclared (first use in this
function)
src/_proj.c:4095: error: ‘empty_string’ undeclared (first use in this
function)
src/_proj.c:4096: error: ‘PyCodeObject’ undeclared (first use in this
function)
src/_proj.c:4096: error: ‘py_code’ undeclared (first use in this
function)
src/_proj.c:4097: error: ‘PyFrameObject’ undeclared (first use in this
function)
src/_proj.c:4097: error: ‘py_frame’ undeclared (first use in this
function)
src/_proj.c:4100: warning: implicit declaration of function
‘PyString_FromString’
src/_proj.c:4107: warning: implicit declaration of function
‘PyString_FromFormat’
src/_proj.c:4120: warning: implicit declaration of function
‘PyModule_GetDict’
src/_proj.c:4120: error: ‘__pyx_m’ undeclared (first use in this
function)
src/_proj.c:4123: warning: implicit declaration of function
‘PyString_FromStringAndSize’
src/_proj.c:4128: warning: implicit declaration of function ‘PyCode_New’
src/_proj.c:4137: error: ‘__pyx_empty_tuple’ undeclared (first use in
this function)
src/_proj.c:4148: warning: implicit declaration of function
‘PyFrame_New’
src/_proj.c:4149: warning: implicit declaration of function
‘PyThreadState_GET’
src/_proj.c:4156: warning: implicit declaration of function
‘PyTraceBack_Here’
src/_proj.c:4158: warning: implicit declaration of function ‘Py_XDECREF’
src/_proj.c: In function ‘__Pyx_InitStrings’:
src/_proj.c:4166: error: ‘__Pyx_StringTabEntry’ has no member named ‘p’
src/_proj.c:4168: error: ‘__Pyx_StringTabEntry’ has no member named
‘is_unicode’
src/_proj.c:4168: error: ‘__Pyx_StringTabEntry’ has no member named
‘is_identifier’
src/_proj.c:4169: error: ‘__Pyx_StringTabEntry’ has no member named ‘p’
src/_proj.c:4169: warning: implicit declaration of function
‘PyUnicode_DecodeUTF8’
src/_proj.c:4169: error: ‘__Pyx_StringTabEntry’ has no member named ‘s’
src/_proj.c:4169: error: ‘__Pyx_StringTabEntry’ has no member named ‘n’
src/_proj.c:4170: error: ‘__Pyx_StringTabEntry’ has no member named
‘intern’
src/_proj.c:4171: error: ‘__Pyx_StringTabEntry’ has no member named ‘p’
src/_proj.c:4171: warning: implicit declaration of function
‘PyString_InternFromString’
src/_proj.c:4171: error: ‘__Pyx_StringTabEntry’ has no member named ‘s’
src/_proj.c:4173: error: ‘__Pyx_StringTabEntry’ has no member named ‘p’
src/_proj.c:4173: error: ‘__Pyx_StringTabEntry’ has no member named ‘s’
src/_proj.c:4173: error: ‘__Pyx_StringTabEntry’ has no member named ‘n’
src/_proj.c:4184: error: ‘__Pyx_StringTabEntry’ has no member named ‘p’
src/_proj.c: At top level:
src/_proj.c:4193: error: expected ‘)’ before ‘*’ token
src/_proj.c:4199: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/_proj.c:4245: error: expected ‘)’ before ‘*’ token
src/_proj.c:4254: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘*’ token
src/_proj.c:4268: error: expected ‘)’ before ‘*’ token
error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv
-O2 -Wall -Wstrict-prototypes -fPIC -Isrc
-I/usr/lib/python2.6/dist-packages/numpy/core/include
-I/usr/include/python2.6 -c src/_proj.c -o
build/temp.linux-i686-2.6/src/_proj.o" failed with exit status 1
Does anyone have any idea of where I am going obviously wrong?
 Kind Regards,
 John
From: Eric F. <ef...@ha...> - 2010年01月30日 21:37:41
per freem wrote:
> hi all,
> 
> I am plotting certain dashed lines in matplotlib, using:
> 
> plt.plot(x, y, '--')
> 
> I'd like to set the dash size (i.e. length of each dash) and the gap
> between the dashes of the plotted line. Is there a way to set this
> from matplotlib?
plt.plot([0,1], [2,3], '--', dashes=(10,20))
The dashes kwarg sets a Line2D parameter. See
http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.lines.Line2D.set_dashes
Eric
> 
> thanks.
> 
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: per f. <per...@gm...> - 2010年01月30日 19:01:42
hi all,
I am plotting certain dashed lines in matplotlib, using:
plt.plot(x, y, '--')
I'd like to set the dash size (i.e. length of each dash) and the gap
between the dashes of the plotted line. Is there a way to set this
from matplotlib?
thanks.
From: Jouni K. S. <jk...@ik...> - 2010年01月30日 18:38:38
Moving to the devel list, since this concerns an internal API of
matplotlib. Thanks to Sourav for reporting this and to Eric for sending
the note to me.
Eric Firing <ef...@ha...> writes:
> Sourav K. Mandal wrote:
>> I have a simple problem: when outputting to PDF or SVG, alpha blending
>> does not work for the lines drawn by "contour". However, alpha blending
>> does work for the regions given by "contourf". 
>
> You are right, this is a real bug, verified in svn. 
The contour function creates a LineCollection, which gets drawn via
draw_path_collection, which the pdf backend inherits from backend_bases.
The default draw_path_collection (or _iter_collection really)
communicates the alpha of the *face color* only by setting the alpha
attribute of the GraphicsContext:
 if rgbFace is not None and len(rgbFace)==4:
 gc0.set_alpha(rgbFace[-1])
 rgbFace = rgbFace[:3]
The alpha of the line only gets communicated via the fourth component of
the rgb attribute of the GraphicsContext, and currently the pdf backend
doesn't do anything with it.
I think this could be resolved in a number of ways, none of which is
obviously the perfect solution:
1. Add a check in _iter_collection for gc0._rgb having an alpha
 component, similar to the current check for rgbFace, and set the
 alpha attribute from that one too. (What if both rgbFace and gc0._rgb
 have an alpha component?)
2. Make each backend's GraphicsContext set the alpha attribute from the
 color. (If the alpha attribute is already set, how should they be
 combined? Multiply, take the minimum, or what?)
3. Either get rid of the alpha attribute on the GraphicsContext and use
 only rgba tuples within backends, or turn it into two attributes
 (e.g. alphaFace and alphaStroke). (What to do with the frontend's
 single alpha attribute?)
By the way, I have never really understood why rgbFace is given
separately from the GraphicsContext. Is this just an evolutionary
remnant or is there a deeper meaning for it?
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
From: Florian L. <mai...@xg...> - 2010年01月30日 18:22:28
Am Freitag, 29. Januar 2010 21:00:04 schrieb Sebastian Busch:
> Florian Lindner wrote:
> > Hello,
> > 
> > I try to use LaTeX in my plot....
> > 
> > florian@horus:~> cat .matplotlib/matplotlibrc
> > text.usetex : true
> > 
> > My plotting code looks like:
> > 
> > Ma = arange(1.0, 5.0, 0.01)
> > Ts = [T(i) for i in Ma] # BTW: Is there a way to spare this line?
> not sure what T is. you could try T(Ma); you can do that of course also
> directly in the plot command
T is a python function:
def T(Ma):
 fp = fluidproperties.IdealGas()
 fp.Ma = Ma
 return NormalShock(fp).fp_out().T / fp.
plot(Ma, T(Ma), label=r'$\frac{T2}{T1}$') does not work. The plot window appears, but no plot.
> > plot(Ma, Ts, label=r'/frac{T2}{T1}')
> should be backslash and math mode:
> plot(Ma, Ts, label=r'$\frac{T2}{T1}$')
> legend()
> show()
> 
> > and that's all, no plot window appears, the script is finished.
> 
> you did not show() !
Actually I did it. I stripped the code before pasting it here, my fault. But not it works, thanks!
Florian
From: Eric E. <eem...@es...> - 2010年01月30日 18:02:47
Hi
I am using "verts" in the matplotlib scatter function and managed to
create many new symbols for scatter plots. One I cannot make is a
spiral-like symbol (logarithmic spiral) because it does connect the
first and last point of the verts series of x,y points I am defining. Is
there a way to avoid that? (so that the spiral-curve stays "open")
thanks!
Eric
From: Eric F. <ef...@ha...> - 2010年01月29日 20:14:19
Florian Lindner wrote:
> Hello,
> 
> I try to use LaTeX in my plot. I follow the instructions from http://www.scipy.org/Cookbook/Matplotlib/UsingTex
> 
> florian@horus:~> cat .matplotlib/matplotlibrc
> text.usetex : true
> 
> My plotting code looks like:
> 
> Ma = arange(1.0, 5.0, 0.01)
> Ts = [T(i) for i in Ma] # BTW: Is there a way to spare this line?
> plot(Ma, Ts, label=r'/frac{T2}{T1}')
> 
> Running the script gives:
> 
> python Stossverlauf.py --verbose-helpful
> 
> $HOME=/home/florian
> CONFIGDIR=/home/florian/.matplotlib
> matplotlib data path /usr/lib64/python2.6/site-packages/matplotlib/mpl-data
> loaded rc file /home/florian/.matplotlib/matplotlibrc
> matplotlib version 0.99.1.1
> verbose.level helpful
> interactive is False
> units is False
> platform is linux2
> Using fontManager instance from /home/florian/.matplotlib/fontList.cache
> /usr/lib/python2.6/site-packages/pytz/tzinfo.py:5: DeprecationWarning: the sets module is deprecated
> from sets import Set
> backend Agg version v2.2
> 
> 
> and that's all, no plot window appears, the script is finished. If I remove the matplotlibrc everything works fine (of course no LaTeX).
> I think all the necessary programs are in place:
> 
> florian@horus:~> which latex
> /usr/local/bin/latex
> florian@horus:~> which dvipng
> /usr/local/bin/dvipng
> florian@horus:~> which gs
> /usr/bin/gs
> 
> Any idea what could be wrong?
In addition to Sebastian's points, make sure your matplotlibrc is 
specifying an interactive backend (e.g. gtkagg, tkagg, wxagg, qt4agg) if 
you want the plot to appear on the screen.
Eric
> 
> Thanks,
> 
> Florian
> 
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Sebastian B. <web...@th...> - 2010年01月29日 20:00:18
Attachments: signature.asc
Florian Lindner wrote:
> Hello,
> 
> I try to use LaTeX in my plot....
> 
> florian@horus:~> cat .matplotlib/matplotlibrc
> text.usetex : true
> 
> My plotting code looks like:
> 
> Ma = arange(1.0, 5.0, 0.01)
> Ts = [T(i) for i in Ma] # BTW: Is there a way to spare this line?
not sure what T is. you could try T(Ma); you can do that of course also
directly in the plot command
> plot(Ma, Ts, label=r'/frac{T2}{T1}')
should be backslash and math mode:
plot(Ma, Ts, label=r'$\frac{T2}{T1}$')
legend()
show()
> and that's all, no plot window appears, the script is finished.
you did not show() !
best,
sebastian.
From: Florian L. <mai...@xg...> - 2010年01月29日 19:49:58
Hello,
I try to use LaTeX in my plot. I follow the instructions from http://www.scipy.org/Cookbook/Matplotlib/UsingTex
florian@horus:~> cat .matplotlib/matplotlibrc
text.usetex : true
My plotting code looks like:
Ma = arange(1.0, 5.0, 0.01)
Ts = [T(i) for i in Ma] # BTW: Is there a way to spare this line?
plot(Ma, Ts, label=r'/frac{T2}{T1}')
Running the script gives:
python Stossverlauf.py --verbose-helpful
$HOME=/home/florian
CONFIGDIR=/home/florian/.matplotlib
matplotlib data path /usr/lib64/python2.6/site-packages/matplotlib/mpl-data
loaded rc file /home/florian/.matplotlib/matplotlibrc
matplotlib version 0.99.1.1
verbose.level helpful
interactive is False
units is False
platform is linux2
Using fontManager instance from /home/florian/.matplotlib/fontList.cache
/usr/lib/python2.6/site-packages/pytz/tzinfo.py:5: DeprecationWarning: the sets module is deprecated
 from sets import Set
backend Agg version v2.2
and that's all, no plot window appears, the script is finished. If I remove the matplotlibrc everything works fine (of course no LaTeX).
I think all the necessary programs are in place:
florian@horus:~> which latex
/usr/local/bin/latex
florian@horus:~> which dvipng
/usr/local/bin/dvipng
florian@horus:~> which gs
/usr/bin/gs
Any idea what could be wrong?
Thanks,
Florian
From: <kc1...@ya...> - 2010年01月29日 19:01:23
Hello,
I am creating a plot with multiple y-axis (up to 6) and twinx works pretty well. The problem is that there are too much wasted spaces used up by the axes. Since I have multiple axes, it cuts into the amount of space available for the plot area. I need to know how I can squeeze some spaces out of the standard axes. First thing I discovered was that I can rotate the tick labels to vertical by:
plt.setp(ax.major_ticklabels, rotation="vertical")
where ax is my y-axis. But then:
(1) How to reduce the space between the tick and the axes label?
First I tried to place the label on top but couldn't get that to work. Then I tried to change the position property of the axis label object and that have no effect. So, can somebody please tell me how I can do these 2 things?
(2) How to avoid overlapping tick labels?
With the way the standard x and y axis are drawn, after I do a vertical rotate of the y tick labels, the first y tick label overlaps with the last x tick label since they are both center aligned. Is there any way to change the alignment of only the first and last tick labels of an axes (while keeping the rest center aligned)?
Thanks,
 --
John Henry
From: Gökhan S. <gok...@gm...> - 2010年01月29日 18:42:49
One minor issue with the example is once you drag one of the items (legend
or text or image) out of the plotting area there is no way to move them back
unless you restart the example.
Do you get the same defect?
On Fri, Jan 29, 2010 at 11:40 AM, Jae-Joon Lee <lee...@gm...> wrote:
> I did some refactoring and now the annotation is also draggable..
> I also added an example,
>
> examples/animation/draggable_legend.py
>
> Regards,
>
> -JJ
>
>
>
> On Fri, Jan 29, 2010 at 10:28 AM, John Hunter <jd...@gm...> wrote:
> > On Thu, Jan 28, 2010 at 10:14 PM, Fernando Perez <fpe...@gm...>
> wrote:
> >> On Thu, Jan 28, 2010 at 8:01 PM, Christopher Barker
> >> <Chr...@no...> wrote:
> >>> Might I suggest that that be made:
> >>>
> >>> leg.draggable(True)
> >>> leg.draggable(False)
> >>>
> >>
> >> Agreed. My favorite api for toggles is:
> >>
> >> _state = True
> >
> > OK, this is committed. Thanks for the suggestion.
> >
> > JDH
> >
> >
> ------------------------------------------------------------------------------
> > The Planet: dedicated and managed hosting, cloud storage, colocation
> > Stay online with enterprise data centers and the best network in the
> business
> > Choose flexible plans and management services without long-term contracts
> > Personal 24x7 support from experience hosting pros just a phone call
> away.
> > http://p.sf.net/sfu/theplanet-com
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-- 
Gökhan
From: Jae-Joon L. <lee...@gm...> - 2010年01月29日 18:04:14
added blitting support.
-JJ
On Fri, Jan 29, 2010 at 12:40 PM, Jae-Joon Lee <lee...@gm...> wrote:
> I did some refactoring and now the annotation is also draggable..
> I also added an example,
>
> examples/animation/draggable_legend.py
>
> Regards,
>
> -JJ
>
>
>
> On Fri, Jan 29, 2010 at 10:28 AM, John Hunter <jd...@gm...> wrote:
>> On Thu, Jan 28, 2010 at 10:14 PM, Fernando Perez <fpe...@gm...> wrote:
>>> On Thu, Jan 28, 2010 at 8:01 PM, Christopher Barker
>>> <Chr...@no...> wrote:
>>>> Might I suggest that that be made:
>>>>
>>>> leg.draggable(True)
>>>> leg.draggable(False)
>>>>
>>>
>>> Agreed. My favorite api for toggles is:
>>>
>>> _state = True
>>
>> OK, this is committed. Thanks for the suggestion.
>>
>> JDH
>>
>> ------------------------------------------------------------------------------
>> The Planet: dedicated and managed hosting, cloud storage, colocation
>> Stay online with enterprise data centers and the best network in the business
>> Choose flexible plans and management services without long-term contracts
>> Personal 24x7 support from experience hosting pros just a phone call away.
>> http://p.sf.net/sfu/theplanet-com
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
From: Jae-Joon L. <lee...@gm...> - 2010年01月29日 17:41:19
I did some refactoring and now the annotation is also draggable..
I also added an example,
examples/animation/draggable_legend.py
Regards,
-JJ
On Fri, Jan 29, 2010 at 10:28 AM, John Hunter <jd...@gm...> wrote:
> On Thu, Jan 28, 2010 at 10:14 PM, Fernando Perez <fpe...@gm...> wrote:
>> On Thu, Jan 28, 2010 at 8:01 PM, Christopher Barker
>> <Chr...@no...> wrote:
>>> Might I suggest that that be made:
>>>
>>> leg.draggable(True)
>>> leg.draggable(False)
>>>
>>
>> Agreed. My favorite api for toggles is:
>>
>> _state = True
>
> OK, this is committed. Thanks for the suggestion.
>
> JDH
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Felix K. <fel...@cf...> - 2010年01月29日 16:38:22
Hi there,
the linestyle mechanism of on-off inks is pretty flexible but still limited to 
dash dot combinations. It would be a nice feature if you could simply use a 
marker inside a linestyle instead of a dot for example. This would decouple 
vertices and markers and add a completely new dimension to linestyles.
I have highly resolved, unregularly spaced data which look rather ugly using 
markers or skipped markers at vertices.
Evaluating the complexity to implement this feature I got lost in the code 
when it comes down to the backend stuff. Which object actually calculates the 
arc lengths to draw the linestyles?
Could that feature be feasible in MPL?
Thanks,
Felix
From: Jeremy L. <jl...@in...> - 2010年01月29日 15:59:13
Hello,
 
I'm using matshow to display a sequence of images in a QT window; i.e each
time a key is pressed a new image is displayed. The performance seems
somewhat sluggish (my baseline here is displaying the images using opencv).
So I'm wondering if there are some well established methods for using
matshow efficiently that I'm missing. Currently, I'm clearing the figure in
between each call to matshow. Does this lead to expensive deallocation and
reallocation of memory which could potentially be avoided by simply changing
the values stored in memory? 
 
Thanks
 
Jeremy Lewi
Engineering Scientist
The Intellisis Corporation
jl...@in...
 
From: Matthieu B. <mat...@gm...> - 2010年01月29日 15:50:34
Hi,
It seems that the compilation of base_format needs a C++ compiler, but
distutils launches icc instead of icpc. This may work with gcc, but
with Intel Compiler, I can't force icc to understand C++.
I don't know what happened between 0.98.5 and 0.99.2, but I can't use
Matplotlib anymore :|
Matthieu
-- 
Information System Engineer, Ph.D.
Blog: http://matt.eifelle.com
LinkedIn: http://www.linkedin.com/in/matthieubrucher
From: John H. <jd...@gm...> - 2010年01月29日 15:28:34
On Thu, Jan 28, 2010 at 10:14 PM, Fernando Perez <fpe...@gm...> wrote:
> On Thu, Jan 28, 2010 at 8:01 PM, Christopher Barker
> <Chr...@no...> wrote:
>> Might I suggest that that be made:
>>
>> leg.draggable(True)
>> leg.draggable(False)
>>
>
> Agreed. My favorite api for toggles is:
>
> _state = True
OK, this is committed. Thanks for the suggestion.
JDH
From: Michele M. <mat...@gm...> - 2010年01月29日 09:46:33
Good job!
+1
On Fri, Jan 29, 2010 at 4:14 AM, Fernando Perez <fpe...@gm...>wrote:
> On Thu, Jan 28, 2010 at 8:01 PM, Christopher Barker
> <Chr...@no...> wrote:
> > Might I suggest that that be made:
> >
> > leg.draggable(True)
> > leg.draggable(False)
> >
>
> Agreed. My favorite api for toggles is:
>
> _state = True
>
> def toggle(state=None):
> global _state
> old = _state
> if state is None:
> _state = not _state
> else:
> _state = state
> return old
>
> ###
>
> This lets you:
>
> - toggle without arguments
> - set state specifically as needed
> - save previous state before setting it if you need to make temporary
> changes.
>
> Cheers,
>
> f
>
>
> ------------------------------------------------------------------------------
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the
> business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
25 messages has been excluded from this view by a project administrator.

Showing results of 346

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