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 11 results of 11

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
> 
From: Lionel R. <lro...@li...> - 2008年07月21日 16:16:38
Hi all,
just to know if there's a proper way to convert a basemap generated with 
contourf to a KML (or polygon shapefile) ?
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日 12:03:24
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
From: John H. <jd...@gm...> - 2008年07月21日 10:35:51
On Mon, Jul 21, 2008 at 2:57 AM, Matthias Michler
<Mat...@gm...> wrote:
> Hello Hussein,
>
> maybe the following example helps you. It uses the module 'time' to wait for
> some seconds.
A note of caution: this example will probably only work with tkagg.
For other GUIs, like gtk, wx, or qt, you will probably want to use a
timeout handler.
JDH
From: John H. <jd...@gm...> - 2008年07月21日 10:09:19
On Mon, Jul 21, 2008 at 4:54 AM, Wolfgang Kerzendorf
<wke...@go...> wrote:
> Dear all,
>
> I find it incredibly hard to work with tick labels in matplotlib (on
> matplotlib 0.98 @ OS X 10.5.4) (It might well be that I haven't
> stumbled across the right solution yet and it is really easy ;-) ). I
Sorry you are having trouble - -suggestions below
> want to first of all change the axis so it displays the normal number
> as ticks and not 0, 1 ,2 ,3 + 6.35e5 or something. I managed that by
You can also just set your own format string:
 import matplotlib.ticker as ticker
 ax.yaxis.set_major_formatter(ticker.FormatStrFormatter('%1.2f')
> reading the ticks and then converting it to strings and use the
> set_ticklabels to get that. The second thing is that I want to make
> the font smaller, e. g. to 'x-small' at the moment I am using a for
> loop to loop through all xticklabels which is allright but imho looks
> to complicated to do something as simple as that.
You can also set the rc parameter
 import matplotlib
 matplotlib.rcParams['ytick.major.size'] = 'x-small'
and likewise for minor ticks.
> I also want to change the padding between the axis and the labels, but
> all my attempts at finding the set_pad method have failed because none
> of the axis objects I could think of had that method.
Did you try setting the rc parameter
 matplotlib.rcParams['ytick.major.pad'] =6
An example rc is at http://matplotlib.sf.net/matplotlibrc. You can
drop this in ~/.matplotlib and make these customizations permanent if
you want.
> Oh and while I'm at it: Is there a function that plots a two
> dimensional array?
ax.imshow plots images
From: Wolfgang K. <wke...@go...> - 2008年07月21日 09:54:24
Dear all,
I find it incredibly hard to work with tick labels in matplotlib (on 
matplotlib 0.98 @ OS X 10.5.4) (It might well be that I haven't 
stumbled across the right solution yet and it is really easy ;-) ). I 
want to first of all change the axis so it displays the normal number 
as ticks and not 0, 1 ,2 ,3 + 6.35e5 or something. I managed that by 
reading the ticks and then converting it to strings and use the 
set_ticklabels to get that. The second thing is that I want to make 
the font smaller, e. g. to 'x-small' at the moment I am using a for 
loop to loop through all xticklabels which is allright but imho looks 
to complicated to do something as simple as that.
I also want to change the padding between the axis and the labels, but 
all my attempts at finding the set_pad method have failed because none 
of the axis objects I could think of had that method.
So here's my workaround for the first two things (each subplot is one 
small window of 6 subplots):
#preparing the subplots()
figure=gcf()
subplots=[]
for i in range(6):
 subplots.append(figure.add_subplot(23*10+i+1))
for i,line in enumerate(line_data):
 subplots[i].axes.ticklabel_format(style='sci',axis='x')
 subplots[i].plot(line[:,0],line[:,1])
 new_ticks=map(str,subplots[i].axes.get_xticks())
 subplots[i].axes.set_xticklabels(new_ticks)
 for ilabel in subplots[i].axes.get_xticklabels():
 ilabel.set_fontsize('x-small')
----------------------
Oh and while I'm at it: Is there a function that plots a two 
dimensional array?
Thanks in advance
 Wolfgang
P.S.: I already looked through the mailing list for the padding issue 
but it only mentioned set_pad which I could not find
From: Matthias M. <Mat...@gm...> - 2008年07月21日 07:57:31
Hello Hussein,
maybe the following example helps you. It uses the module 'time' to wait for 
some seconds.
regards Matthias
--------------- "test.dat": ----------------------------------------------
#time x_coordinate y_coordinate
0.1 1 1
0.2 2 2
0.3 3 3
0.4 4 4
-------------------- "... .py": --------------------------------------------------
from scipy.io import read_array
import pylab as pl
import numpy as npy
import time
data = read_array("test.dat")
pl.ion() # Turn interactive mode on.
pl.figure()
pl.subplot(111, autoscale_on=False)
pl.axis([0.0, 5.0, 0.0, 5.0])
# plot the first point:
point, = pl.plot([data[0, 1]], [data[0, 2]], 'b+')
pl.draw()
print "first (x, y) = ", data[0, 1:]
for i in xrange(1, npy.shape(data)[0]):
 # wait time-difference * 10 seconds
 time.sleep((data[i, 0]-data[i-1, 0])*10)
 # reset data of plotted point
 point.set_data(npy.array([data[i, 1]]), npy.array([data[i, 2]]))
 pl.draw()
 pl.draw()
 
 print "new (x, y) = ", data[i, 1:]
pl.ioff() # Turn interactive mode off. 
pl.show()
-------------------------------------------------------------------------------------------
On Sunday 20 July 2008 21:31:42 hussein alshatri wrote:
> Hi all,
>
> I am new with matplotlib. I want to use matplotlib/animation.
>
> I want to plot a moving point. The information comes from input file that
> include columens as bellow:
>
> #time x_coordinate y_coordinate
>
> I have seen the examples on the website, But I don't know how to configure
> the time.
>
> Could anyone just guide me how to do this or if there is a short example it
> would be great...
>
> Thank you in advanced.
>
> Hussein
From: charlesrkiss <cha...@gm...> - 2008年07月21日 06:25:18
How about this for a stationary point:
from pylab import *
def point(x,y):
a=arange(x,x+1,1)
b=arange(y,y+1,1)
plot(a,b, 'ro', ms=3)
show()
This works for me.
Load the module "point"
Run it by typing point(x,y), where x and y are the coordinates you'd like to
see in a plot, and a magical red "point" will appear in your matplotlib
figure. You can change the color and size, of course, by modifying the color
('ro') and markersize ('ms= 3') keyword arguments to suit your needs.
Now just put in a t parameter, I guess.
hussein alshatri wrote:
> 
> 
> Hi all,
> 
> I am new with matplotlib. I want to use matplotlib/animation. 
> 
> I want to plot a moving point. The information comes from input file that
> include columens as bellow:
> 
> #time x_coordinate y_coordinate
> 
> I have seen the examples on the website, But I don't know how to configure
> the time.
> 
> Could anyone just guide me how to do this or if there is a short example
> it would be great...
> 
> Thank you in advanced.
> 
> Hussein
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> 
> -------------------------------------------------------------------------
> 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
> 
> 
-- 
View this message in context: http://www.nabble.com/plot-a-moving-point-from-an-input-file-tp18557820p18562838.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jeff W. <js...@fa...> - 2008年07月21日 02:26:05
Ryan May wrote:
> Jeff,
>
> Is there any way to get transform_vector to only adjust the vector for 
> the projection, not do any interpolation? I have a set of irregularly 
> arranged points, so I'm unsure how to make it work.
>
> Ryan
>
> 
Ryan: Yes, you can just use the rotate_vector method. Has to be 
gridded data though, since derivative calculations are involved. 
-Jeff
From: Ryan M. <rm...@gm...> - 2008年07月21日 00:45:50
Jeff,
Is there any way to get transform_vector to only adjust the vector for 
the projection, not do any interpolation? I have a set of irregularly 
arranged points, so I'm unsure how to make it work.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

Showing 11 results of 11

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