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


Showing results of 395

<< < 1 .. 3 4 5 6 7 .. 16 > >> (Page 5 of 16)
From: \Jonathan H. http://JonathansCorner.com\ <jon...@po...> - 2008年07月24日 15:22:14
Taking a step back:
What should I be digging into so I'll have the concepts and tools to
manipulate features like color and thickness of borders on a bar chart and
on a pie graph and any parts that may have a border, whether the shadow on a
pie graph is on the lower left or upper right, etc.?
I'm looking at the
tutorial<http://matplotlib.sourceforge.net/tutorial.html>; I'd welcome
suggestions or clarifications about what I should be reading.
On Tue, Jul 22, 2008 at 4:57 PM, John Hunter <jd...@gm...> wrote:
> On Tue, Jul 22, 2008 at 4:28 PM, Jonathan Hayward
> http://JonathansCorner.com <jon...@po...> wrote:
> > On the two routines I'm modifying from examples, boundaries and borders
> are
> > generally a hefty black.
> >
> > How can I control color and/or thickness and/or turn off items like
> > boundaries that are drawn in black?
>
> There are two borders in question, the figure border and the axes
> border. Both are rectangle instances. You can control the figure
> border with the figurePatch instance
>
> fig.figurePatch.set_edgecolor('white')
> fig.figurePatch.set_linewidth(0.5)
>
> and similarly for the axes axesFrame instance
>
> ax = axes([left, bottom, width, height])
> ax.axesFrame.set_edgecolor('red')
> ax.axesFrame.set_linewidth(0.5)
>
> You can make the frame invisible in a few different ways:
>
> * set the edgecolor to be the same as the face color
> * set the linewidth to 0
> * set the visible property to False (ax.axesFrame.set_visible(False))
>
> JDH
>
-- 
-- Jonathan Hayward, chr...@gm...
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com
++ Would you like to curl up with one of my hardcover books?
++ You can now get my books from http://CJSHayward.com
From: Scott S. <sin...@uk...> - 2008年07月24日 08:48:38
Nice!
>>> Ryan May <rm...@gm...> 07/24/08 4:55 AM >>>
To anyone interested (especially the meteorologists out there), 
Matplotlib SVN trunk now has support for doing wind barb plots.
Please find our Email Disclaimer here: http://www.ukzn.ac.za/disclaimer/
From: David K. <Dav...@ir...> - 2008年07月24日 08:38:10
Hi,
This is just a warning email that we are planning changes to the names
of the attributes in the ContourLabeler class (used by ContourSet
objects to add labels to contours). Attribute names like .cl_xy will
become .labelXYs, etc. If there is anyone out there whose code will be
broken by changing the names of these attributes, please let us know so
that we can build a bit of backwards compatibility into the next
release.
Thanks,
David
-- 
**********************************
David M. Kaplan
Charge de Recherche 1
Institut de Recherche pour le Developpement
Centre de Recherche Halieutique Mediterraneenne et Tropicale
av. Jean Monnet
B.P. 171
34203 Sete cedex
France
Phone: +33 (0)4 99 57 32 27
Fax: +33 (0)4 99 57 32 95
http://www.ur097.ird.fr/team/dkaplan/index.html
**********************************
From: Ryan M. <rm...@gm...> - 2008年07月24日 02:55:14
Attachments: windbarbs.png
Hi,
To anyone interested (especially the meteorologists out there), 
Matplotlib SVN trunk now has support for doing wind barb plots. These 
are plots for vector fields, traditionally used by meteorologists to 
plot wind observations, though any vector field can be used. It's 
similar to the plots produced by quiver, with a line pointing along the 
direction of the vector. The difference is that the magnitude of the 
vector is not indicated by the length of the plotted vector, but rather 
by the presence of various markings along the length of the vector: 
flags (triangles), full lines, and half lines. Traditionally, these 
represent increments of 50, 10, and 5, respectively. There's a demo in 
examples/pylab_examples/barb_demo.py, and I've attached it's output here 
to clarify what these things actually look like. Most of the visual 
appearance (colors, sizes, etc.) is configurable, down to the level 
where you can colormap the barbs by a scalar.
So if you're interested and use SVN, give it look and see what you 
think. If you're not an SVN user, you can expect to see them in the 
next release, 0.98.3, which should be out (tentatively) at the end of 
the week.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: Lionel R. <lro...@li...> - 2008年07月23日 16:07:48
thanks for this link Scott, I went into the refernce API directly 
without looking at this tutorial. Effectively, it works :-)
Scott Sinclair a écrit :
>>>> Lionel Roubeyrie <lro...@li...> 07/23/08 9:37 AM >>>
>>>> 
> I want to "convert" a filled contours map generated with 
> Basemap (example here : http://imagebin.ca/view/3nYnN3.html)
> to a polygon shapefile (vector). 
>
> After multiple tests, I can retrieve the polygons points coordinates via 
> matplotlib.Patch and save them in a shp file. Now I have troubles with 
> "real" coordinates and meta-datas, but nothing impossible :-)
> 
>
> Hi,
>
> If you're after a 'quick and dirty' solution.
>
> As I understand it a KML file can be used to specify the Latitude and Longitude extent of a raster image (See 'Ground Overlays' at http://code.google.com/apis/kml/documentation/kml_tut.html). If you can accept some distortion of the text on your image (should be small with a small region) and can work out the size of each pixel in degrees of lat and lon, then all you need to do is write a simple text file to specify where Google Earth should display your Basemap contour map.
>
> What you're doing does sound more elegant, but more complex.
>
> Regards,
> Scott
>
>
>
> Please find our Email Disclaimer here: http://www.ukzn.ac.za/disclaimer/
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> 
-- 
Lionel Roubeyrie - lro...@li...
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr
From: John H. <jd...@gm...> - 2008年07月23日 14:19:24
On Wed, Jul 23, 2008 at 9:06 AM, Jonathan Hayward http://JonathansCorner.com
>> fig = figure((8,6), dpi=100) # 800x600
>
> When I tried placing that line in a couple of places, I got an error:
Sorry, my fault, you need the keyword argument figsize:
In [1]: import matplotlib.pyplot as plt
In [2]: fig = plt.figure(figsize=(8,6), dpi=100) # 800x600
From: \Jonathan H. http://JonathansCorner.com\ <jon...@po...> - 2008年07月23日 14:06:04
On Tue, Jul 22, 2008 at 4:54 PM, John Hunter <jd...@gm...> wrote:
> On Tue, Jul 22, 2008 at 4:06 PM, Jonathan Hayward
> http://JonathansCorner.com <jon...@po...> wrote:
> > Thank you; I've shrunk the graphic part.
>
> Please respond to the mailing list ("reply to all")
>
Oops; sorry.
>
>
> > When I save it as an image, it's painting an 800x600 image, so I've
> shrunk
> > the portion of the 800x600 image I'm using. Is there a way to crop or do
> > something comparable?
>
> Not sure I understand the question. You can control the figure size
> in pixels by setting the figure size in inches and the dpi -- the
> pixel size is the prodict of the two
>
> fig = figure((8,6), dpi=100) # 800x600
>
When I tried placing that line in a couple of places, I got an error:
jhayward@jhayward-desktop ~/bin $ ./barchart
Traceback (most recent call last):
 File "./barchart", line 6, in ?
 fig = figure((8,6), dpi=100)
 File "/usr/lib/python2.4/site-packages/matplotlib/pyplot.py", line 186, in
figure
 FigureClass=FigureClass,
 File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py",
line 44, in new_figure_manager
 return FigureManagerGTKAgg(canvas, num)
 File
"/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py", line
405, in __init__
 self.window.set_title("Figure %d" % num)
TypeError: not all arguments converted during string formatting
Are there other things it needs? (I tried placing a space so "8,6" would
read "8, 6", but it didn't significantly change the error.)
>
> you can control the *relative* proportion of the axes by using the
> axes command as before
>
> ax = axes([left, bottom, width, height])
>
> with these two, you should be able to get whatever size and
> proportions you want.
>
> JDH
>
-- 
-- Jonathan Hayward, chr...@gm...
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com
++ Would you like to curl up with one of my hardcover books?
++ You can now get my books from http://CJSHayward.com
From: Scott S. <sin...@uk...> - 2008年07月23日 11:51:32
>>> Lionel Roubeyrie <lro...@li...> 07/23/08 9:37 AM >>>
I want to "convert" a filled contours map generated with 
Basemap (example here : http://imagebin.ca/view/3nYnN3.html)
to a polygon shapefile (vector). 
After multiple tests, I can retrieve the polygons points coordinates via 
matplotlib.Patch and save them in a shp file. Now I have troubles with 
"real" coordinates and meta-datas, but nothing impossible :-)
>>>
Hi,
If you're after a 'quick and dirty' solution.
As I understand it a KML file can be used to specify the Latitude and Longitude extent of a raster image (See 'Ground Overlays' at http://code.google.com/apis/kml/documentation/kml_tut.html). If you can accept some distortion of the text on your image (should be small with a small region) and can work out the size of each pixel in degrees of lat and lon, then all you need to do is write a simple text file to specify where Google Earth should display your Basemap contour map.
What you're doing does sound more elegant, but more complex.
Regards,
Scott
Please find our Email Disclaimer here: http://www.ukzn.ac.za/disclaimer/
From: Eli B. <eb...@gm...> - 2008年07月23日 11:35:01
Thanks,
This unicode thing works like magic.
The only thing I am still unable to do is to insert the symbol \epsilon (as
distinct from \varepsilon).
For some reason, the varepsilon ε is printed fine, but a blank square is
printed instead of the lunate epsilon ε.
That is u' ε ' works, while u' ε' does not.
Any idea why this is happening ?
Eli
2008年7月22日 Michael Droettboom <md...@st...>:
> Yes, you would put it at the top of your .py file.
>
> In order to use Unicode in Python source code, you have to tell the Python
> interpreter what encoding the file is in. That's done with a little "magic"
> comment at the top of the file. The popular Unixy editors (emacs, vim etc.)
> also understand this comment and will save the file correctly. Possibly
> other editors do as well.
>
> For more gory details that you probably need, see this:
>
> http://www.amk.ca/python/howto/unicode
>
> particularly the section "Unicode Literals in Python Source Code".
>
> Cheers,
> Mike
>
> Eli Brosh wrote:
>
>> Thanks,
>> This seems to be a solution.
>> I have an editor that supports unicode.
>> But, can you please explain better how do I make the coding directive at
>> the top of my source files ?
>> Where do I write the command:
>> # -*- coding: utf-8 -*-
>>
>> Is it inside the python script ?
>>
>>
>> Sorry for the ignorance.
>> Eli
>>
>> On Tue, Jul 22, 2008 at 10:14 AM, Michael Droettboom <md...@st...<mailto:
>> md...@st...>> wrote:
>>
>> As an alternative, you could just use Unicode to insert the Greek
>> characters:
>>
>> r"α-Fe (Someone 2003)"
>>
>> The default font used by matplotlib, Vera Sans, includes a full
>> set of Greek characters. This, of course, requires an editor that
>> supports Unicode and a coding directive at the top of your source
>> files, eg.:
>>
>> # -*- coding: utf-8 -*-
>>
>>
>> Cheers,
>> Mike
>>
>> Eli Brosh wrote:
>>
>> Here is the use case I have in mind:
>> Plotting properties of various phases of iron, I need a legend
>> with greek letters and normal text:
>> \alpha-Fe, Someone (2003)
>>
>> Now, I need the names e.g. someone to be upright.
>> Also, the relbar between \alpha and Fe is shorter with normal
>> text fonts than with italics.
>>
>> I can solve the problem by using r'\rm{\alpha-Fe, Someone
>> (2003)}' but it would be easier if I could just change the
>> defaults.
>>
>> Eli
>>
>>
>> On Mon, Jul 21, 2008 at 6:21 PM, Michael Droettboom
>> <md...@st... <mailto:md...@st...>
>> <mailto:md...@st... <mailto:md...@st...>>> wrote:
>>
>> Unfortunately there isn't. This is *theoretically* possible
>> with
>> the STIX fonts, but that hasn't been implemented. However, with
>> the Computer Modern fonts, many of the glyphs simply aren't
>> present (upright Greek, for example) to make this happen.
>>
>> That said, I'm not sure this is necessarily a good idea.
>> Math has
>> a set of commonly accepted conventions about when to use italic
>> vs. upright that may only confuse the reader when not followed.
>> Can you provide a use case?
>>
>> Cheers,
>> Mike
>>
>> Eli Brosh wrote:
>>
>> Hello
>> I there a way to change the default mathtext font from
>> cal to rm ?
>> I would like to use the rm (serif) font without stating
>> rm{...} or mathrm{...}.
>> Is it possible to do using the matplotlibrc ?
>> can you give me an example of how this is done ?
>>
>> Thanks
>> Eli
>>
>> ------------------------------------------------------------------------
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move
>> Developer's challenge
>> Build the coolest Linux based applications with Moblin
>> SDK &
>> win great prizes
>> Grand prize is a trip for two to an Open Source event
>> anywhere
>> in the world
>>
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>> <
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> <http://moblin-contest.org/redirect.php?banner_id=100&url=/>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> <mailto:Mat...@li...>
>> <mailto:Mat...@li...
>> <mailto: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
>>
>>
>>
> --
> Michael Droettboom
> Science Software Branch
> Operations and Engineering Division
> Space Telescope Science Institute
> Operated by AURA for NASA
>
>
From: Lionel R. <lro...@li...> - 2008年07月23日 07:37:39
Hi Tim,
like I said, I want to "convert" a filled contours map generated with 
Basemap (example here : http://imagebin.ca/view/3nYnN3.html)
to a polygon shapefile (vector). The filled contours are from a regular 
points grid which can already be saved into a point shapefile (via ogr 
python bindings)
and I use QGIS to render it. Now I search to get the filled result into 
a shp file to pass it through "ogr2ogr -f KML" and render it with 
GoogleEarth.
I know I can do all this process with the QGIS-GRASS interface, but I 
must limit softwares dependencies 'cause it'll be placed on a web 
server, and I think Python it's the best choice for doing that :-)
After multiple tests, I can retrieve the polygons points coordinates via 
matplotlib.Patch and save them in a shp file. Now I have troubles with 
"real" coordinates and meta-datas, but nothing impossible :-)
Tim Michelsen a écrit :
>> Looks like I've done a mistake with my last post, sorry Eli...
>> I know how to save datas to a shapefile with the OGR library but only 
>> for points datas.
>> 
>
>
> 
>> I'll appreciate if somebody can point me how to save a filled contour 
>> map basemap into a polygon shapefile, can't find any example with google.
>> 
> What do you really want to save here?
> A basemap with a contour surface overlayed can be viewed as a assembly 
> of various layers. So this is like the result of the gis operations when 
> you launch the map composer to finish your map.
>
> If you want to create a raster file from the contour part plotted over a 
> basemap I think the python bindings of gdal will get you started.
> http://pypi.python.org/pypi/GDAL/
> I succeded into writing a tiff file from a gdal array.
>
> I don't know how to write a vector file from python with ogr or shapely. 
> But these questions are better to be asked on the gdal list.:
>
> So about interpolating to a contour look at shapely. Writing should be 
> accomplished with ogr.
>
> That said, I only have testing "experience" with writing geodata with 
> python.
>
> The overkill may be to invoke the respective GRASS command by a script.
>
> I would appreciate if you would tell us what you use by the end.
>
> Kind regards,
> Timmie
>
>
> When it comes to python and GIS the first stop seems to be:
>
> * http://gispython.org/
> * http://lists.gispython.org/mailman/listinfo/community
>
> Some more links:
> * http://de.giswiki.net/wiki/Kategorie:Python
> * http://de.giswiki.net/wiki/WorldMill
> * http://zcologia.com/news/750/keytree/
> * http://sgillies.net/
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> 
-- 
Lionel Roubeyrie - lro...@li...
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr
From: Tim M. <tim...@gm...> - 2008年07月22日 23:24:08
> Looks like I've done a mistake with my last post, sorry Eli...
> I know how to save datas to a shapefile with the OGR library but only 
> for points datas.
> I'll appreciate if somebody can point me how to save a filled contour 
> map basemap into a polygon shapefile, can't find any example with google.
What do you really want to save here?
A basemap with a contour surface overlayed can be viewed as a assembly 
of various layers. So this is like the result of the gis operations when 
you launch the map composer to finish your map.
If you want to create a raster file from the contour part plotted over a 
basemap I think the python bindings of gdal will get you started.
http://pypi.python.org/pypi/GDAL/
I succeded into writing a tiff file from a gdal array.
I don't know how to write a vector file from python with ogr or shapely. 
 But these questions are better to be asked on the gdal list.:
So about interpolating to a contour look at shapely. Writing should be 
accomplished with ogr.
That said, I only have testing "experience" with writing geodata with 
python.
The overkill may be to invoke the respective GRASS command by a script.
I would appreciate if you would tell us what you use by the end.
Kind regards,
Timmie
When it comes to python and GIS the first stop seems to be:
* http://gispython.org/
* http://lists.gispython.org/mailman/listinfo/community
Some more links:
* http://de.giswiki.net/wiki/Kategorie:Python
* http://de.giswiki.net/wiki/WorldMill
* http://zcologia.com/news/750/keytree/
* http://sgillies.net/
From: John H. <jd...@gm...> - 2008年07月22日 21:57:51
On Tue, Jul 22, 2008 at 4:28 PM, Jonathan Hayward
http://JonathansCorner.com <jon...@po...> wrote:
> On the two routines I'm modifying from examples, boundaries and borders are
> generally a hefty black.
>
> How can I control color and/or thickness and/or turn off items like
> boundaries that are drawn in black?
There are two borders in question, the figure border and the axes
border. Both are rectangle instances. You can control the figure
border with the figurePatch instance
fig.figurePatch.set_edgecolor('white')
fig.figurePatch.set_linewidth(0.5)
and similarly for the axes axesFrame instance
ax = axes([left, bottom, width, height])
ax.axesFrame.set_edgecolor('red')
ax.axesFrame.set_linewidth(0.5)
You can make the frame invisible in a few different ways:
 * set the edgecolor to be the same as the face color
 * set the linewidth to 0
 * set the visible property to False (ax.axesFrame.set_visible(False))
JDH
From: John H. <jd...@gm...> - 2008年07月22日 21:55:13
On Tue, Jul 22, 2008 at 4:06 PM, Jonathan Hayward
http://JonathansCorner.com <jon...@po...> wrote:
> Thank you; I've shrunk the graphic part.
Please respond to the mailing list ("reply to all")
> When I save it as an image, it's painting an 800x600 image, so I've shrunk
> the portion of the 800x600 image I'm using. Is there a way to crop or do
> something comparable?
Not sure I understand the question. You can control the figure size
in pixels by setting the figure size in inches and the dpi -- the
pixel size is the prodict of the two
 fig = figure((8,6), dpi=100) # 800x600
you can control the *relative* proportion of the axes by using the
axes command as before
 ax = axes([left, bottom, width, height])
with these two, you should be able to get whatever size and
proportions you want.
JDH
From: \Jonathan H. http://JonathansCorner.com\ <jon...@po...> - 2008年07月22日 21:28:07
On the two routines I'm modifying from examples, boundaries and borders are
generally a hefty black.
How can I control color and/or thickness and/or turn off items like
boundaries that are drawn in black?
-- 
-- Jonathan Hayward, chr...@gm...
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com
++ Would you like to curl up with one of my hardcover books?
++ You can now get my books from http://CJSHayward.com
From: John H. <jd...@gm...> - 2008年07月22日 20:57:08
On Tue, Jul 22, 2008 at 3:51 PM, Jonathan Hayward http://JonathansCorner.com
> I would like to shrink the graph height to a third or a fourth of its
> present value, and possibly cut the padding. How can I control that?
You can create an axes for plotting into with whatever dimensions you
want, by manually spcifying
 axes([left, bottom, width, height])
where each are in relative 0..1 coordinates. Eg, for a smaller height
with more padding all around
 axes([0.2, 0.2, 0.6, 0.4])
JDH
From: \Jonathan H. http://JonathansCorner.com\ <jon...@po...> - 2008年07月22日 20:52:00
I'm tinkering with a modified version of
http://matplotlib.sourceforge.net/screenshots/barchart_demo.py :
# a bar plot with errorbars
# a bar plot with errorbars
from pylab import *
N = 5
menMeans = (20, 35, 30, 35, 27)
menStd = ( 2, 3, 4, 1, 2)
ind = arange(N) # the x locations for the groups
width = 0.35 # the width of the bars
p1 = bar(ind, menMeans, width, color='r', yerr=menStd)
womenMeans = (25, 32, 34, 20, 25)
womenStd = ( 3, 5, 2, 3, 3)
p2 = bar(ind+width, womenMeans, width, color='y', yerr=womenStd)
ylabel('Scores')
title('Scores by group and gender')
xticks(ind+width, ('G1', 'G2', 'G3', 'G4', 'G5') )
xlim(-width,len(ind))
yticks(arange(0,41,10))
legend( (p1[0], p2[0]), ('Men', 'Women'), shadow=True)
show()
I would like to shrink the graph height to a third or a fourth of its
present value, and possibly cut the padding. How can I control that?
TIA,
-- 
-- Jonathan Hayward, chr...@gm...
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com
++ Would you like to curl up with one of my hardcover books?
++ You can now get my books from http://CJSHayward.com
From: Michael D. <md...@st...> - 2008年07月22日 19:41:06
Yes, you would put it at the top of your .py file.
In order to use Unicode in Python source code, you have to tell the 
Python interpreter what encoding the file is in. That's done with a 
little "magic" comment at the top of the file. The popular Unixy 
editors (emacs, vim etc.) also understand this comment and will save the 
file correctly. Possibly other editors do as well.
For more gory details that you probably need, see this:
http://www.amk.ca/python/howto/unicode
particularly the section "Unicode Literals in Python Source Code".
Cheers,
Mike
Eli Brosh wrote:
> Thanks,
> This seems to be a solution.
> I have an editor that supports unicode.
> But, can you please explain better how do I make the coding directive 
> at the top of my source files ?
> Where do I write the command:
> # -*- coding: utf-8 -*-
>
> Is it inside the python script ?
>
>
> Sorry for the ignorance.
> Eli
>
> On Tue, Jul 22, 2008 at 10:14 AM, Michael Droettboom <md...@st... 
> <mailto:md...@st...>> wrote:
>
> As an alternative, you could just use Unicode to insert the Greek
> characters:
>
> r"α-Fe (Someone 2003)"
>
> The default font used by matplotlib, Vera Sans, includes a full
> set of Greek characters. This, of course, requires an editor that
> supports Unicode and a coding directive at the top of your source
> files, eg.:
>
> # -*- coding: utf-8 -*-
>
>
> Cheers,
> Mike
>
> Eli Brosh wrote:
>
> Here is the use case I have in mind:
> Plotting properties of various phases of iron, I need a legend
> with greek letters and normal text:
> \alpha-Fe, Someone (2003)
>
> Now, I need the names e.g. someone to be upright.
> Also, the relbar between \alpha and Fe is shorter with normal
> text fonts than with italics.
>
> I can solve the problem by using r'\rm{\alpha-Fe, Someone
> (2003)}' but it would be easier if I could just change the
> defaults.
>
> Eli
>
>
> On Mon, Jul 21, 2008 at 6:21 PM, Michael Droettboom
> <md...@st... <mailto:md...@st...>
> <mailto:md...@st... <mailto:md...@st...>>> wrote:
>
> Unfortunately there isn't. This is *theoretically* possible
> with
> the STIX fonts, but that hasn't been implemented. However, with
> the Computer Modern fonts, many of the glyphs simply aren't
> present (upright Greek, for example) to make this happen.
>
> That said, I'm not sure this is necessarily a good idea.
> Math has
> a set of commonly accepted conventions about when to use italic
> vs. upright that may only confuse the reader when not followed.
> Can you provide a use case?
>
> Cheers,
> Mike
>
> Eli Brosh wrote:
>
> Hello
> I there a way to change the default mathtext font from
> cal to rm ?
> I would like to use the rm (serif) font without stating
> rm{...} or mathrm{...}.
> Is it possible to do using the matplotlibrc ?
> can you give me an example of how this is done ?
>
> Thanks
> Eli
> 
> ------------------------------------------------------------------------
>
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> Build the coolest Linux based applications with Moblin
> SDK &
> win great prizes
> Grand prize is a trip for two to an Open Source event
> anywhere
> in the world
> 
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
> 
> <http://moblin-contest.org/redirect.php?banner_id=100&url=/
> <http://moblin-contest.org/redirect.php?banner_id=100&url=/>>
> 
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> <mailto:Mat...@li...>
> <mailto:Mat...@li...
> <mailto: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
>
>
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Eli B. <eb...@gm...> - 2008年07月22日 19:00:20
Thanks,
This seems to be a solution.
I have an editor that supports unicode.
But, can you please explain better how do I make the coding directive at the
top of my source files ?
Where do I write the command:
# -*- coding: utf-8 -*-
Is it inside the python script ?
Sorry for the ignorance.
Eli
On Tue, Jul 22, 2008 at 10:14 AM, Michael Droettboom <md...@st...>
wrote:
> As an alternative, you could just use Unicode to insert the Greek
> characters:
>
> r"α-Fe (Someone 2003)"
>
> The default font used by matplotlib, Vera Sans, includes a full set of
> Greek characters. This, of course, requires an editor that supports Unicode
> and a coding directive at the top of your source files, eg.:
>
> # -*- coding: utf-8 -*-
>
> Cheers,
> Mike
>
> Eli Brosh wrote:
>
>> Here is the use case I have in mind:
>> Plotting properties of various phases of iron, I need a legend with greek
>> letters and normal text:
>> \alpha-Fe, Someone (2003)
>>
>> Now, I need the names e.g. someone to be upright.
>> Also, the relbar between \alpha and Fe is shorter with normal text fonts
>> than with italics.
>>
>> I can solve the problem by using r'\rm{\alpha-Fe, Someone (2003)}' but it
>> would be easier if I could just change the defaults.
>>
>> Eli
>>
>>
>> On Mon, Jul 21, 2008 at 6:21 PM, Michael Droettboom <md...@st...<mailto:
>> md...@st...>> wrote:
>>
>> Unfortunately there isn't. This is *theoretically* possible with
>> the STIX fonts, but that hasn't been implemented. However, with
>> the Computer Modern fonts, many of the glyphs simply aren't
>> present (upright Greek, for example) to make this happen.
>>
>> That said, I'm not sure this is necessarily a good idea. Math has
>> a set of commonly accepted conventions about when to use italic
>> vs. upright that may only confuse the reader when not followed.
>> Can you provide a use case?
>>
>> Cheers,
>> Mike
>>
>> Eli Brosh wrote:
>>
>> Hello
>> I there a way to change the default mathtext font from cal to rm ?
>> I would like to use the rm (serif) font without stating
>> rm{...} or mathrm{...}.
>> Is it possible to do using the matplotlibrc ?
>> can you give me an example of how this is done ?
>>
>> Thanks
>> Eli
>>
>> ------------------------------------------------------------------------
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move
>> Developer's challenge
>> Build the coolest Linux based applications with Moblin SDK &
>> win great prizes
>> Grand prize is a trip for two to an Open Source event anywhere
>> in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> <mailto: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: Michael D. <md...@st...> - 2008年07月22日 18:40:21
You probably want to look at this FAQ:
http://matplotlib.sourceforge.net/faq.html#APPSERVER
Or the slightly more updated and elaborate answer in the new 
(in-progress) docs:
http://matplotlib.sourceforge.net/doc/html/faq/howto_faq.html#how-do-i-use-matplotlib-in-a-web-application-server
Cheers,
Mike
"Jonathan Hayward http://JonathansCorner.com" wrote:
> I would like to use pylab in a CGI script that would generate a pie 
> chart/bar graph/..., save it to a file, and then be able to output the 
> image from the file.
>
> Everything that I've tried works if I run the script from my shell, 
> but when it runs on my test box (or, for that matter, a sudo without 
> an X display being set up), it gripes about not being able to open an 
> X display.
>
> Is there a way to either:
>
> 1: Tell pylab to run without a display,
> 2: Configure a dummy display, or
> 3: Attach the web environment to a real display?
>
> I'm not having it display windows or asking for interesting X 
> functionality--just generate a pie chart and save it as a file.
>
> -- 
> -- Jonathan Hayward, chr...@gm... 
> <mailto:chr...@gm...>
>
> ** To see an award-winning website with stories, essays, artwork,
> ** games, and a four-dimensional maze, why not visit my home page?
> ** All of this is waiting for you at http://JonathansCorner.com
>
> ++ Would you like to curl up with one of my hardcover books?
> ++ You can now get my books from http://CJSHayward.com
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: \Jonathan H. http://JonathansCorner.com\ <jon...@po...> - 2008年07月22日 18:23:41
I would like to use pylab in a CGI script that would generate a pie
chart/bar graph/..., save it to a file, and then be able to output the image
from the file.
Everything that I've tried works if I run the script from my shell, but when
it runs on my test box (or, for that matter, a sudo without an X display
being set up), it gripes about not being able to open an X display.
Is there a way to either:
1: Tell pylab to run without a display,
2: Configure a dummy display, or
3: Attach the web environment to a real display?
I'm not having it display windows or asking for interesting X
functionality--just generate a pie chart and save it as a file.
-- 
-- Jonathan Hayward, chr...@gm...
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com
++ Would you like to curl up with one of my hardcover books?
++ You can now get my books from http://CJSHayward.com
From: Michael D. <md...@st...> - 2008年07月22日 14:14:29
As an alternative, you could just use Unicode to insert the Greek 
characters:
r"α-Fe (Someone 2003)"
The default font used by matplotlib, Vera Sans, includes a full set of 
Greek characters. This, of course, requires an editor that supports 
Unicode and a coding directive at the top of your source files, eg.:
# -*- coding: utf-8 -*-
Cheers,
Mike
Eli Brosh wrote:
> Here is the use case I have in mind:
> Plotting properties of various phases of iron, I need a legend with 
> greek letters and normal text:
> \alpha-Fe, Someone (2003)
>
> Now, I need the names e.g. someone to be upright.
> Also, the relbar between \alpha and Fe is shorter with normal text 
> fonts than with italics.
>
> I can solve the problem by using r'\rm{\alpha-Fe, Someone (2003)}' but 
> it would be easier if I could just change the defaults.
>
> Eli
>
>
> On Mon, Jul 21, 2008 at 6:21 PM, Michael Droettboom <md...@st... 
> <mailto:md...@st...>> wrote:
>
> Unfortunately there isn't. This is *theoretically* possible with
> the STIX fonts, but that hasn't been implemented. However, with
> the Computer Modern fonts, many of the glyphs simply aren't
> present (upright Greek, for example) to make this happen.
>
> That said, I'm not sure this is necessarily a good idea. Math has
> a set of commonly accepted conventions about when to use italic
> vs. upright that may only confuse the reader when not followed.
> Can you provide a use case?
>
> Cheers,
> Mike
>
> Eli Brosh wrote:
>
> Hello
> I there a way to change the default mathtext font from cal to rm ?
> I would like to use the rm (serif) font without stating
> rm{...} or mathrm{...}.
> Is it possible to do using the matplotlibrc ?
> can you give me an example of how this is done ?
>
> Thanks
> Eli
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move
> Developer's challenge
> Build the coolest Linux based applications with Moblin SDK &
> win great prizes
> Grand prize is a trip for two to an Open Source event anywhere
> in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> <http://moblin-contest.org/redirect.php?banner_id=100&url=/>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> <mailto: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: Jeff W. <js...@fa...> - 2008年07月22日 10:52:41
Lionel Roubeyrie wrote:
> Looks like I've done a mistake with my last post, sorry Eli...
> I know how to save datas to a shapefile with the OGR library but only 
> for points datas.
> I'll appreciate if somebody can point me how to save a filled contour 
> map basemap into a polygon shapefile, can't find any example with google.
> Thanks
>
> 
Lionel: I've never done that, and don't know anyone who has. Would be 
a valuable contribution though.
-Jeff
From: Lionel R. <lro...@li...> - 2008年07月22日 07:11:53
Looks like I've done a mistake with my last post, sorry Eli...
I know how to save datas to a shapefile with the OGR library but only 
for points datas.
I'll appreciate if somebody can point me how to save a filled contour 
map basemap into a polygon shapefile, can't find any example with google.
Thanks
-- 
Lionel Roubeyrie - lro...@li...
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr
From: Eli B. <eb...@gm...> - 2008年07月21日 23:57:57
Here is the use case I have in mind:
Plotting properties of various phases of iron, I need a legend with greek
letters and normal text:
\alpha-Fe, Someone (2003)
Now, I need the names e.g. someone to be upright.
Also, the relbar between \alpha and Fe is shorter with normal text fonts
than with italics.
I can solve the problem by using r'\rm{\alpha-Fe, Someone (2003)}' but it
would be easier if I could just change the defaults.
Eli
On Mon, Jul 21, 2008 at 6:21 PM, Michael Droettboom <md...@st...> wrote:
> Unfortunately there isn't. This is *theoretically* possible with the STIX
> fonts, but that hasn't been implemented. However, with the Computer Modern
> fonts, many of the glyphs simply aren't present (upright Greek, for example)
> to make this happen.
>
> That said, I'm not sure this is necessarily a good idea. Math has a set of
> commonly accepted conventions about when to use italic vs. upright that may
> only confuse the reader when not followed. Can you provide a use case?
>
> Cheers,
> Mike
>
> Eli Brosh wrote:
>
>> Hello
>> I there a way to change the default mathtext font from cal to rm ?
>> I would like to use the rm (serif) font without stating rm{...} or
>> mathrm{...}.
>> Is it possible to do using the matplotlibrc ?
>> can you give me an example of how this is done ?
>>
>> Thanks
>> Eli
>> ------------------------------------------------------------------------
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
>
From: Michael D. <md...@st...> - 2008年07月21日 22:25:32
Unfortunately there isn't. This is *theoretically* possible with the 
STIX fonts, but that hasn't been implemented. However, with the 
Computer Modern fonts, many of the glyphs simply aren't present (upright 
Greek, for example) to make this happen.
That said, I'm not sure this is necessarily a good idea. Math has a set 
of commonly accepted conventions about when to use italic vs. upright 
that may only confuse the reader when not followed. Can you provide a 
use case?
Cheers,
Mike
Eli Brosh wrote:
> Hello
> I there a way to change the default mathtext font from cal to rm ?
> I would like to use the rm (serif) font without stating rm{...} or 
> mathrm{...}.
> Is it possible to do using the matplotlibrc ?
> can you give me an example of how this is done ?
>
> Thanks
> Eli
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
8 messages has been excluded from this view by a project administrator.

Showing results of 395

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