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

Showing 20 results of 20

From: olusina e. <eri...@ya...> - 2008年02月28日 23:00:34
I am a new user of Python and need to also use matplotlib but I am having some problems which I hope somebody will be able to help me with.
 I have two versions of Python on my laptop that runs on Windows XP. Version 2.4 installed in a folder named python 24 and I also have VisIt which has associated with it Python Version 2.5. I installed matplotlib for version 2.4 on my laptop and it detected the Python version 2.4 and installed itself in the right folder. However I can only use Python 2.4 when I am in this folder (c:\python24\). When I call python from any other folder is loads the 2.5 version.
 For the other version of Python (the 2.5 version) I can call this version from any directory but when I installed matplotlib for Python version 2.5, it will not import pylab even though I can call this version of Python from any folder.
 The problem I have is I have a working folder with subfolders and I need to use pylab for some plots. If I call python from this folder it loads 2.5, which will not import pylab. I put the working folder in c:\python24\ and it still calls 2.5 version. 
 How can I get my system to call python 2.4 from any folder
 Or
 Get python 2.5 to import pylab.
 I have put the path for both versions of python as shown below:
 Path to Python version 2.5:
 C:\Program Files\LLNL\VisIt 1.6.1\Python\Lib;C:\Program Files\LLNL\VisIt 1.6.1\Python\DLLs;C:\Program Files\LLNL\VisIt 1.6.1\Python\Lib\lib-tk
 
 Path to Python version 2.4:
 C:\Python24\Lib;C:\Python24\DLLs;C:\Python24\Lib\lib-tk
 
 Thanks for your help
 Eric
 
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
From: Steve S. <el...@gm...> - 2008年02月28日 20:08:52
On Thu, Feb 28, 2008 at 05:40:00PM +0000, Davide Cellai wrote:
> 1. To begin with, I've copied the lines:
> 
> deb http://anakonda.altervista.org/debian packages/
> deb-src http://anakonda.altervista.org/debian sources/
>
I'm sure matplotlib is in Ubuntu's official repos by now [1]. Same for Debian.
> 2. When I try to run some examples I have downloaded from the website, the
> program complains about modules. For example, if I try
> python hline_demo.py
> 
Ubuntu's latest version is 0.90.1. According to [2], the pyplot
module was introduced with 0.91.2.
[1] http://packages.ubuntu.com/search?keywords=matplotlib&searchon=names&suite=all&section=all
[2] http://matplotlib.sourceforge.net/whats_new.html
cheers,
steve
From: chombee <ch...@ne...> - 2008年02月28日 19:48:54
I'm making some scatter plots which will probably end up getting printed
in black and white. I'm actually drawing two scatter plots onto one
axes. So to the distinguish between the two plots I've had them use
different marker shapes and different shades of grey.
The problem is that the legend displays only a rectangular block
indicating the color for each plot. Is there a way to get the marker
shapes of scatter plots into the legend?
Thanks
From: Davide C. <da...@fi...> - 2008年02月28日 17:40:05
Hi there,
Very basic questions.
I have installed matplotlib by Synaptic on Ubuntu and I'm trying to get the
examples work (without much success!).
1. To begin with, I've copied the lines:
deb http://anakonda.altervista.org/debian packages/
deb-src http://anakonda.altervista.org/debian sources/
into /etc/apt/sources.list, but when I try to update I get errors like this:
Failed to fetch http://anakonda.altervista.org/debian/packages/Packages.gz
302 Moved Temporarily [IP: 193.1.172.188 8484]
2. When I try to run some examples I have downloaded from the website, the
program complains about modules. For example, if I try
python hline_demo.py
I get:
Traceback (most recent call last):
 File "hline_demo.py", line 2, in <module>
 from matplotlib.pyplot import *
ImportError: No module named pyplot
Can anybody help here?
Cheers,
Davide
From: Stephane R. <ste...@gm...> - 2008年02月28日 15:54:42
Hi,
when I set the locale to a value (let's say 'en_US.UTF-8' different
from my that of environement ('fr_FR'), it is automatically switched
back to 'fr_FR.UTF-8' after the first figure is created when the
backend is dervied from Qt (no problem with Agg only).
Any idea how to prevent from that?
-- 
Stephane Raynaud
From: chombee <ch...@ne...> - 2008年02月28日 15:16:19
Okay I see what's going on now. The output from axis('tight') specifies
the limits of the two axes:
> (-0.33718689788053952,
> 7.0809248554913298,
> -0.34782608695652173,
> 7.3043478260869561)
As you can see it's actually setting negative minimum limits for both
axes, which is why the axes are offset from the (0,0) position. The clue
to this behaviour is in the axis function docstring:
> axis('auto') or 'normal' (deprecated) restores default behavior;
> axis limits are automatically scaled to make the data fit
> comfortably within the plot box.
and
> axis('tight') changes x and y axis limits such that all data is
> shown. If all data is already shown, it will move it to the center
> of the figure without modifying (xmax-xmin) or (ymax-ymin). Note
> this is slightly different than in matlab.
Neither of those will necessarily set the xmin and ymin of the axes to
0. It depends on what data you've plotted before calling axis(). I found
that if I call axis('tight') before plotting anything (i.e. before
calling plot or scatter) then the axes xmin and ymin do get set to 0,
but this is because at the time of calling axis('tight') there is no
data to show.
If you call axis('tight') after plotting data then (contrary to the
docstring) it seems to adjust the axes so that all data is shown **and
none of it is too close to the axes**, there is some degree of padding,
although it is tighter than with axis('auto').
I'm not sure about this 'auto' and 'tight' behaviour. To my eye the
corner formed by the x and y axes at the bottom-left signifies (0,0),
unless otherwise stated. The padding applied by 'normal' and 'tight'
breaks this expectation. In my case, when I don't have any numerical
labels on the axes to show that they begin at (-0.34,-0.35), I should
probably make sure that they begin at (0,0).
You can explicitly set the axes limits with axis(xmin=0,ymin=0).
From: John H. <jd...@gm...> - 2008年02月28日 15:09:40
On Thu, Feb 28, 2008 at 8:51 AM, chombee <ch...@ne...> wrote:
> That did improve the situation slightly, but it still looks like
> something odd is going on. It's clearer if I actually draw the axis
> frame. These two screenshots show the graphic before and after calling
> axis('tight'):
When did you call axis('tight')? It should be after all of your other
plotting commands.
JDH
From: chombee <ch...@ne...> - 2008年02月28日 14:55:37
On Thu, 2008年02月28日 at 14:19 +0100, Bernhard Voigt wrote:
> 
> How do I get rid of the redundant ticks on the top and right
> edges?
> 
> pylab.gca().get_xaxis().set_ticks_postion('bottom')
> 
> same for yaxis
That worked, thanks!
 
> Why is there such a big gap between the plot itself and the
> axes ticks?
> 
> did you try pylab.axis('tight') 
That did improve the situation slightly, but it still looks like
something odd is going on. It's clearer if I actually draw the axis
frame. These two screenshots show the graphic before and after calling
axis('tight'):
http://img87.imageshack.us/img87/7352/beforetightku8.png
http://img403.imageshack.us/img403/9506/aftertightyk5.png
As you can see the data moves a little closer to the axes when I call
axis('tight'). But that dashed line starts at (0,0), it is plotted with
the simple command:
plot([0,7],[0,7],color='#999999',linestyle='--')
and yet the beginning of the line is nowhere near either axis, even
after calling axis('tight'). So something's up. Here's the output of
axis('tight'):
 (-0.33718689788053952,
 7.0809248554913298,
 -0.34782608695652173,
 7.3043478260869561)
And here's the source code that produced the graphic in the first place:
rc('xtick.major',size=8)
rc('xtick',direction='out')
rc('ytick.major',size=8)
rc('ytick',direction='out')
fig = figure(facecolor='white' )
ax = axes(frameon=True)
ax.get_xaxis().set_ticks_position('bottom')
ax.get_yaxis().set_ticks_position('left')
title('Comparison of frequency of cards per function in week one and
week two')
s =
scatter(functions.proportioncardsweek1,functions.proportioncardsweek2,marker='s',color='g')
plot([0,7],[0,7],color='#999999',linestyle='--')
xlabel('Proportion of total number of cards, week 1')
ylabel('Proportion of total number of cards, week 2')
xticks(functions.proportioncardsweek1,'
'*len(functions.proportioncardsweek1))
yticks(functions.proportioncardsweek2,'
'*len(functions.proportioncardsweek2))
for function,x,y in
map(None,functions.shortnames,functions.proportioncardsweek1,functions.proportioncardsweek2):
 annotate(function,xy=(x,y),size=8)
From: Pierre GM <pgm...@gm...> - 2008年02月28日 14:07:57
Michael,
Give scikits.timeseries a try. It's a package designed to handle time series, 
with or without missing data or dates, for which matplotlib functions are 
also available. 
http://scipy.org/scipy/scikits/wiki/TimeSeries
The problem you're refering to (missing dates) is trivial with this package.
Let me know if you have any problem with it. Please note that plotting with 
hourly frequency is still experimental (and we need some feedback). 
HIH
P.
From: Jose Gomez-D. <jgo...@gm...> - 2008年02月28日 14:04:27
Hi,
On Thu, Feb 28, 2008 at 1:47 PM, John Hunter <jd...@gm...> wrote:
>
> If I understand what you are trying to do, you should be using the
> sharex and sharey settings for ax1
Mmm, I don't think so. The extent of one image and other are in different
units, so I need to transform whatever value it is I have in one image to
the corresponding window in the other image. I don't know whether there's an
explicit way to let matplotlib know of a transformation function for this.
Not sure (it should) but I would use fig.canvas.draw() here in any case.
>
Your suggestion works fine! Thanks!
Jose
-- 
Centre for Terrestrial Carbon Dynamics
Department of Geography, University College London
Gower Street, London WC1E 6BT, UK
From: John H. <jd...@gm...> - 2008年02月28日 13:57:23
On Wed, Feb 27, 2008 at 12:04 PM, chombee <ch...@ne...> wrote:
> Is there any way to stop some of my text labels from overlapping?
For the ones that are tightly clustered, you could use the annotate
command to move the text farther away from the associated point.
Annotate has support for drawing an arrow from the text label to the
annotated point. But it won't do auto-layout -- you'll still have to
choose the coordinates of the text label so they don't overlap.
JDH
From: John H. <jd...@gm...> - 2008年02月28日 13:49:47
On Thu, Feb 28, 2008 at 6:55 AM, Jose Gomez-Dans <jgo...@gm...> wrote:
> Hi!
> I have two datasets with different data coordinates, which I want to plot on
> different subplots, all showing the same extent. I want to be able to zoom
> into one of the subplots, and have the other follow (through some conversion
> of the former's extent).
> Initially, I just want one plot to follow the other (but I could easily
> extend that to both plots if needs be). The code works, but I cannot update
> my plots automatically, although I call pylab.draw(). What's the way to
> have my plots respond to my events without dragging the window borders,
> resizing the window, etc? I am using matplotlib 0.90.1 and GTKAgg backend on
> Linux. Here's some code snippet of what I am doing:
If I understand what you are trying to do, you should be using the
sharex and sharey settings for ax1
 ax1 = fig.add_subplot(211)
 ax2 = fig.add_subplot(212, sharex=ax1, sharey=ax1)
then the xlim and ylim will be shared, so panning/zooming navigation
in either will affect both.
> pylab.draw() #Why doesn't the window refresh when it gets here? I
Not sure (it should) but I would use fig.canvas.draw() here in any case.
JDH
From: Bernhard V. <Ber...@de...> - 2008年02月28日 13:19:52
> How do I get rid of the redundant ticks on the top and right edges?
pylab.gca().get_xaxis().set_ticks_postion('bottom')
same for yaxis
> Is there any way to stop some of my text labels from overlapping?
don't know
> Why is there such a big gap between the plot itself and the axes ticks?
did you try pylab.axis('tight')
Bernhard
From: Jose Gomez-D. <jgo...@gm...> - 2008年02月28日 12:55:26
Hi!
I have two datasets with different data coordinates, which I want to plot on
different subplots, all showing the same extent. I want to be able to zoom
into one of the subplots, and have the other follow (through some conversion
of the former's extent).
Initially, I just want one plot to follow the other (but I could easily
extend that to both plots if needs be). The code works, but I cannot update
my plots automatically, although I call pylab.draw(). What's the way to
have my plots respond to my events without dragging the window borders,
resizing the window, etc? I am using matplotlib 0.90.1 and GTKAgg backend on
Linux. Here's some code snippet of what I am doing:
fig=pylab.figure()
ax =fig.add_subplot(211)
xtent1=(1111950.520,3335851.559,-2223901.039,-1111950.520)
xtent2=(0,2477,0,2319 )
im1=ax.imshow( image1,extent=xtent1,picker=True)
ax2=fig.add_subplot(212)
im2=ax2.imshow( image2)
ax2.set_xlim (1073, 1797)
ax2.set_ylim (1944, 1588)
pylab.draw()
def pick_new_extent(event):
 artist = event.artist
 (xlow,xhigh) = artist.get_axes().get_xlim()
 (ylow,yhigh) = artist.get_axes().get_ylim()
 [xmin, xmax, ymin, ymax] = CalculateWindowCoordinates(xlow, xhigh,
ylow, yhigh) #This does the coordinate transformation
 ax2.set_xlim(xmin,xmax)
 ax2.set_ylim(ymax, ymin)
 pylab.draw() #Why doesn't the window refresh when it gets here? I
need to change the window size to get it to refresh!!
fig.canvas.mpl_connect('pick_event', pick_new_exent)
Thanks!
Jose
-- 
Centre for Terrestrial Carbon Dynamics
Department of Geography, University College London
Gower Street, London WC1E 6BT, UK
From: yves f. <yve...@gm...> - 2008年02月28日 09:23:24
On Thu, Feb 28, 2008 at 9:33 AM, darckense <dar...@fr...> wrote:
> Hello all,
>
> When you create a graph with a legend using legend(), is there a way to remove
> the black border drawn around the legend ?
I asked the same question some time ago. The trick is setting the
linewidth to zero:
from pylab import *
....
lg = legend()
lg.get_frame().set_linewidth(0)
Maybe there are other ways, but this one works for me.
Cheers,
YVES
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Lionel R. <lro...@li...> - 2008年02月28日 08:59:34
Jeff,
yes it works, the unique constraint is to put the image when we create the 
basemap instance.
Le jeudi 28 février 2008, Jeff Whitaker a écrit :
> Lionel Roubeyrie wrote:
> > Hi Jeff,
> > yes I see this method, but set_xlim and set_ylim use axes coordinates,
> > and I would like to use geographic coordinates.
> > It would be great if we could put an image in a map directly by
> > specifying its geographic coordinates
>
> Lionel: There's no way to do that - but it's pretty easy to convert to
> geographic to map (axes) coordinates using the Basemap instance __call__
> method. So, if m is the Basemap instance, you can do something like
>
> x1,y1 = m(lon1,lon1)
> x2,y2 = m(lon2,lat2)
> ax.set_ylim(y1,y2)
> ax.set_xlim(x1,x2)
>
> -Jeff
>
> > Le mardi 26 février 2008, Jeff Whitaker a écrit :
> >> Lionel Roubeyrie wrote:
> >>> Hi all,
> >>> I'm sure it's a trivial question, but can't find any valid answer in
> >>> the basemap examples directory or with google : I have a georeferenced
> >>> TIFF file in 'lcc' projection, representing a little portion of France,
> >>> and I need to put it on a map, resets map limits to a closed portion of
> >>> the map, and put contours on it. I see how to initialise Basemap with
> >>> the limits of the raster, but not how to "make a zoom" in the map by
> >>> specifing coordinates. Thanks for your help
> >>
> >> Lionel: You can use the set_xlim and set_ylim axes methods to manually
> >> 'zoom' the plot. It has to be done after all the other plotting though,
> >> since all the Basemap methods (contour, imshow etc) will reset the axes
> >> limits to show the entire map region.
> >>
> >> -Jeff
-- 
Lionel Roubeyrie - lro...@li...
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr
From: darckense <dar...@fr...> - 2008年02月28日 08:33:08
Hello all,
When you create a graph with a legend using legend(), is there a way to remove 
the black border drawn around the legend ?
Thanks.
From: Michaël D. <mic...@la...> - 2008年02月28日 07:59:13
Thanks for you reply Eric.
Since I am a beginner in matplotlib, I don't want to blame the soft 
first. I mean it could be a bug, but I have the feeling my code for 
masking the missing data is useless.
My real question is : How to mask data that do not exist ??? In the 
masked_demo.py example, it is show how to mask data from a set like "My 
data are
x=[1,2,3,4,5,6,7,8,9,10]
y = sin(x) or anyelse continuous fonction and I want to mask 1,2,3 so I 
write : ym = ma.masked_where(y <3, y)
But in my case, it is more like :
x = [1,2,3,4,7,8,9,15,16,17]
y = discrete values (no continuous fonction !) like 
[5,2,20,17,3,12,9,18,18,9]
What I want to do with these data :
1/plot graph with no line connecting the point (x,y) = (4,17) and the 
point (7,3), etc.
2/fill the space under the plot but do not fill the space where there is 
no data (eg between the same 2 points).
The 1st thing seems to be easy = just follow the example masked_demo
But in my case, how can I mask data that don't exist ? I can't write ym 
= ma.masked_where(y <3, y)
Hum, I hope I was clearer....
Michael
Eric Firing a écrit :
> You have run into a bug in the combination of poly_between and 
> fill--maybe only the former, which not taking masked arrays into 
> account. I have not looked at it enough to know whether it will be 
> easy or hard to fix, but it certainly should be fixed. I can't look 
> at it more right now, unfortunately.
>
> Eric
>
> Michaël Douchin wrote:
>> Hi list
>>
>> I searched the list and google, but couldn't find a way to solve my pbm.
>>
>> I have data stored in a list (from an sql query) , with these "columns":
>> x = time serie in hours
>> y = some level value
>>
>> There are some missing values : eg between 08:33 and 08:40.
>> Here is my code :
>> sqla="SELECT * FROM import_parcelle a WHERE dat_loc='" + 
>> date_traite + "' AND code_uc='" + code_uc + "' ORDER BY a.heu_loc ;"
>> resa=db.query(sqla)
>> data=resa.dictresult() #x = time serie
>> x= [ datetime.datetime(*time.strptime(a["dat_loc"]+" 
>> "+a["heu_loc"],'%Y-%m-%d %H:%M:%S')[0:6] ) for a in data]
>> #y5 = tank level
>> y5= [float(a["niv_cuv"]) for a in data] # --> extraction de la 
>> colonne y1
>> figure()
>> # the plot command with no mask
>> 
>> plot_date(x,y5,color='b',linestyle='None',marker='',xdate=True,ydate=False) 
>>
>> #the mask
>> #ym5 = ma.masked_where(y5 <300, y5)
>> #plot_date(x,ym5,color='r',linestyle='-',xdate=True,ydate=False)
>> #the filling under the curve
>> xs, ys = poly_between(x, 0, y5)
>> fill(xs,ys)
>>
>>
>> Here is the result:
>> http://michaeldouchin.free.fr/17_2007年06月07日_10B_vitesse.png
>> As you see, I commented the lines with the mask, because it did not 
>> change anything
>>
>> To see what I am looking for, here is the result under R (a 
>> statistical tool)
>> http://michaeldouchin.free.fr/17_2007年06月07日_10B_vitesse.jpg
>> As you see, between 08:48 and 08:50 (for example), there is a gap, 
>> showing we have no data for this interval.
>>
>> As I want to automatically draw this graph for different set of data, 
>> I can't look each set in detail.
>> I tried to folow the example masked_demo.py, but I could not adapt it 
>> to my case....
>>
>> Any hint ?
>> Thanks very much in advance
>>
>> Michael
>>
>> ------------------------------------------------------------------------- 
>>
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
From: Charlie M. <cw...@gm...> - 2008年02月28日 01:26:39
Out of the country. I am cc'ing the matplotlib list.
On Wed, Feb 27, 2008 at 3:08 PM, Luis Carlos Garelli <
lga...@us...> wrote:
>
> Message body follows:
>
> Greetings, first, sorry to bother you... I am working using
> the matplotlib, and i am having some strange problems with
> my application. When i execute in some pcs, there is no
> problem at all, but in others pcs, i receive this message:
>
> File "pylab.pyc", line 1 in ?
> File "matplotlib\pylab.pyc", line 203 in ?
> File "matplotlib\axes.pyc", line 14 in ?
> File "matplotlib\agg.pyc", line 5 in ?
> File "matplotlib\_agg.pyc", line 12 in ?
> File "matplotlib\_agg.pyc", line 10 in ?
> ImportError: Dll Load Failed
>
> All the pc's have Windows Xp, most of them Pentium 4, some
> are Pentium D. I don't know what may be the issue. All those
> pcs have the same software, just different hardware, i hope
> you could help me with this little problem. Thanks in advance...
>
> --
> This message has been sent to you, a registered SourceForge.net user,
> by another site user, through the SourceForge.net site. This message
> has been delivered to your SourceForge.net mail alias. You may reply
> to this message using the "Reply" feature of your email client, or
> using the messaging facility of SourceForge.net at:
> https://sourceforge.net/sendmessage.php?touser=2021607
>
>
From: Jeff W. <js...@fa...> - 2008年02月28日 01:03:47
Lionel Roubeyrie wrote:
> Hi Jeff,
> yes I see this method, but set_xlim and set_ylim use axes coordinates, and I 
> would like to use geographic coordinates.
> It would be great if we could put an image in a map directly by specifying its 
> geographic coordinates
> 
Lionel: There's no way to do that - but it's pretty easy to convert to 
geographic to map (axes) coordinates using the Basemap instance __call__ 
method. So, if m is the Basemap instance, you can do something like
x1,y1 = m(lon1,lon1)
x2,y2 = m(lon2,lat2)
ax.set_ylim(y1,y2)
ax.set_xlim(x1,x2)
-Jeff
> Le mardi 26 février 2008, Jeff Whitaker a écrit :
> 
>> Lionel Roubeyrie wrote:
>> 
>>> Hi all,
>>> I'm sure it's a trivial question, but can't find any valid answer in the
>>> basemap examples directory or with google : I have a georeferenced TIFF
>>> file in 'lcc' projection, representing a little portion of France, and I
>>> need to put it on a map, resets map limits to a closed portion of the
>>> map, and put contours on it. I see how to initialise Basemap with the
>>> limits of the raster, but not how to "make a zoom" in the map by
>>> specifing coordinates. Thanks for your help
>>> 
>> Lionel: You can use the set_xlim and set_ylim axes methods to manually
>> 'zoom' the plot. It has to be done after all the other plotting though,
>> since all the Basemap methods (contour, imshow etc) will reset the axes
>> limits to show the entire map region.
>>
>> -Jeff
>> 
>
>
>
> 
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328

Showing 20 results of 20

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