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





Showing 6 results of 6

From: Darren D. <dar...@co...> - 2008年03月15日 11:34:03
On Saturday 15 March 2008 4:06:39 am Tim Mortimer wrote:
> Hi Folks,
>
> I've been using Python about 9 months or so, inspired mainly by the desire
> to work more effectively with Csound. Python has been a revelation to my
> creativity & music making ambitions, & probably the most satisfying &
> consuming creative diversion i have ever made.
>
> Ive today installed Numpy & Matplotlib (on XP), & set TKagg as my backend
> in the matplotlibrc file.
>
> When i try & run the plot([1,2,3]) example (im working from the matplotlib
> user guide pdf document, which generally looks very nice, much like
> matplotlib itself dare i say..) a TK window opens, but nothing appears in
> it, the hourglass continues ad infinitum, & the process eventually hangs.
>
> This also happened when i ran IDLE from the command line (something i'd
> never done before) with the -n flag...
>
> Idle's window tells me that an output plot object was sucessfully created
> however...
>
> So, err, what could the problem be?
Would you set "verbose.level : debug" in your matplotlibrc, try again, and 
post the output?
From: Tim M. <tim...@d2...> - 2008年03月15日 08:06:43
Hi Folks,
I've been using Python about 9 months or so, inspired mainly by the desire
to work more effectively with Csound. Python has been a revelation to my
creativity & music making ambitions, & probably the most satisfying &
consuming creative diversion i have ever made.
Ive today installed Numpy & Matplotlib (on XP), & set TKagg as my backend in
the matplotlibrc file.
When i try & run the plot([1,2,3]) example (im working from the matplotlib
user guide pdf document, which generally looks very nice, much like
matplotlib itself dare i say..) a TK window opens, but nothing appears in
it, the hourglass continues ad infinitum, & the process eventually hangs.
This also happened when i ran IDLE from the command line (something i'd
never done before) with the -n flag...
Idle's window tells me that an output plot object was sucessfully created
however...
So, err, what could the problem be? I'm using standard windows binary
installers for everything, Python 2.5, Numpy 1.0.3.1, Matplotlib 0.91.2.
Everything imports ok.
On a less immediate note, i would like to address people to this post i made
earlier today on the Tkinter list
http://www.nabble.com/drawing-multiple-functions-on-the-canvas-td16064458.html
for some advice &/or assistance. Whilst i can see Matplotlib as being useful
to my DSP & musicmaking world in a number of adhoc ways, i'm primarily
interested in trying to find shortcuts & methods to defining "arbitrary"
functions with the mouse(/wacom) input, recording the x/y(/z) data into an
array, & refreshing / displaying that data to the screen. 
There seems to be plenty around to help me scribble on a canvas, but not in
a way that allows me to keep unique, "function" like, myfunc[x] = y lists &
display them to screen.
I've been aware for awhile now that Matplotlib may offer me some elegant &
more than adequate solutions to displaying mathematically defined functions,
but can it help me design by hand & output overlays of arbitrary xy patterns
& relationships at all? 
All i would need to do is then output my input created XY arrays / lists to
.txt file, & bring the data into my existing Python / Csound environment for
immediate & easy use. 
So if anyone has any advice on the simplest, lowlevel way i might go about
attempting this (with or without Matplotlib) that'd be ace. But essentially
i am talking about displaying & refreshing plots after all, right? so
hopefully this is a good place to start.
Spoilt for choice, swamped by info, uncertain how best to proceed.
many thanks
Tim
-----
*******************
www.phasetransitions.net
hermetic music * python * csound * possibly mindless ranting
various werk in perpetual delusions of progress....
-- 
View this message in context: http://www.nabble.com/Newbie---plot%28-1%2C2%2C3-%29-issues---Csound-tp16065553p16065553.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
Zane Selvans wrote:
> Well, the translation/rotation on a sphere is just a kind of wish-list 
> thing... but it would be awfully nice. It seems like someone must 
> have done that, for re-drawing continental outlines as they drift 
> across the surface of the earth over time or something.
>
> What I do need, for instance, is to be able to build up a polyline 
> object given a starting (lat,lon), an azimuth, and a distance to go. 
> Like:
>
> start at (lat0,lon0)
> go 10km at a heading (calculated based on my location and time)
> what is my new (lat,lon)?
> Calculate a new heading (based on my new location and time)
> go another 10km along that heading.
> etc.
> etc.
>
> saving each of the (lat,lon) points that I stop at, every X km along 
> the way.
>
> It needs to work even if I go near a pole, or across the "wrap-around" 
> point in Longitude.
>
> Then I need to be able to take that lineament (list of lat,lon points) 
> and compare its shape to the great circle which best fits its overall 
> trajectory, e.g. distance to the best-fit great circle from the 
> lineament as a function of distance along the lineament.
>
> I want to be able to generate statistically similar synthetic 
> lineaments, based on a mapped lineament, like, lineaments that have a 
> similar power spectrum (compared to their best fit great circle), but 
> a different overall shape, or orientation.
>
> And I need to be able to calculate the points at which different 
> lineaments intersect, and the ordering of the intersections along 
> lineaments... I.e. the lineament object needs to be able to answer the 
> question, given a set of other lineament obejcts, "who do I intersect 
> with, and in what order, and how far along me is each of those 
> intersections?"
>
> It's only at the very end that I need to be able to take one of these 
> polylines and send it to the map for visualization. Mostly I need to 
> be able to analyze it.
>
> Thanks for any suggestions on packages to look at.
>
> I should dig deeper into Basemap to see what all it does.
>
> Zane
Zane: Check out the pyproj module included in basemap, specifically 
pyproj.Geod (http://pyproj.googlecode.com/svn/trunk/README.html).
It can accessed by doing
from mpl_toolkits.basemap import pyproj (in svn)
from matplotlib.toolkits.basemap import pyproj (in the released version)
-Jeff
>
> Jeff Whitaker wrote:
>> Zane Selvans wrote:
>>> Hello all,
>>>
>>> I need to do analysis of vector data (linear features, polylines) on 
>>> the surface of a sphere. Many of the lines span a significant 
>>> portion of the circumferance of the the body in question (Jupiter's 
>>> moon Europa), and I want to be able to do the display of the data 
>>> and analysis within Matplotlib.
>>>
>>> Rather than writing my own (probably lame) module for manipulating 
>>> and generating linear features stored as lists of (lat,lon) points, 
>>> I'd prefer to build on someone else's work.
>>>
>>> After a little searching around, it seems like most open GIS 
>>> packages (e.g. OGL, GDAL) seem to work exclusively within a 
>>> projected planar space. Am I missing something? Is there anyone 
>>> else out there that does this kind of thing? What solutions do 
>>> people have that work well with Matplotlib and the Basemap toolkit?
>>>
>>> Ideally, I'd like to have the ability to perform transformations on 
>>> the polylines, rotating and translating them on the surface of the 
>>> sphere (without having to do the spherical trig myself), and I have 
>>> to be able to have features cross the "date line" and wrap-around 
>>> intelligently, calculate great-circle distances (and forward/back 
>>> azimuths), best-fit great circles, etc.
>>>
>>> Thanks for any recommendations you might have,
>>> Zane
>>>
>>
>> Zane: Basemap can calculate great-circle distances (with 
>> forward/back azimuths). I'm not to clear on the types of 
>> transformations you need, but Basemap basically just does the forward 
>> and inverse transformations from map projection to geographic 
>> (lat/lon) coordinates. My guess is that it won't do the type of 
>> rotation and translation that you want to do.
>>
>> -Jeff
>>
>
>
> -------------------------------------------------------------------------
> 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
> 
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328
From: Zane S. <za...@id...> - 2008年03月15日 01:21:22
Attachments: zane.vcf
Well, the translation/rotation on a sphere is just a kind of wish-list 
thing... but it would be awfully nice. It seems like someone must have 
done that, for re-drawing continental outlines as they drift across the 
surface of the earth over time or something.
What I do need, for instance, is to be able to build up a polyline 
object given a starting (lat,lon), an azimuth, and a distance to go. Like:
start at (lat0,lon0)
go 10km at a heading (calculated based on my location and time)
what is my new (lat,lon)?
Calculate a new heading (based on my new location and time)
go another 10km along that heading.
etc.
etc.
saving each of the (lat,lon) points that I stop at, every X km along the 
way.
It needs to work even if I go near a pole, or across the "wrap-around" 
point in Longitude.
Then I need to be able to take that lineament (list of lat,lon points) 
and compare its shape to the great circle which best fits its overall 
trajectory, e.g. distance to the best-fit great circle from the 
lineament as a function of distance along the lineament.
I want to be able to generate statistically similar synthetic 
lineaments, based on a mapped lineament, like, lineaments that have a 
similar power spectrum (compared to their best fit great circle), but a 
different overall shape, or orientation.
And I need to be able to calculate the points at which different 
lineaments intersect, and the ordering of the intersections along 
lineaments... I.e. the lineament object needs to be able to answer the 
question, given a set of other lineament obejcts, "who do I intersect 
with, and in what order, and how far along me is each of those 
intersections?"
It's only at the very end that I need to be able to take one of these 
polylines and send it to the map for visualization. Mostly I need to be 
able to analyze it.
Thanks for any suggestions on packages to look at.
I should dig deeper into Basemap to see what all it does.
Zane
Jeff Whitaker wrote:
> Zane Selvans wrote:
>> Hello all,
>>
>> I need to do analysis of vector data (linear features, polylines) on 
>> the surface of a sphere. Many of the lines span a significant portion 
>> of the circumferance of the the body in question (Jupiter's moon 
>> Europa), and I want to be able to do the display of the data and 
>> analysis within Matplotlib.
>>
>> Rather than writing my own (probably lame) module for manipulating and 
>> generating linear features stored as lists of (lat,lon) points, I'd 
>> prefer to build on someone else's work.
>>
>> After a little searching around, it seems like most open GIS packages 
>> (e.g. OGL, GDAL) seem to work exclusively within a projected planar 
>> space. Am I missing something? Is there anyone else out there that 
>> does this kind of thing? What solutions do people have that work well 
>> with Matplotlib and the Basemap toolkit?
>>
>> Ideally, I'd like to have the ability to perform transformations on 
>> the polylines, rotating and translating them on the surface of the 
>> sphere (without having to do the spherical trig myself), and I have to 
>> be able to have features cross the "date line" and wrap-around 
>> intelligently, calculate great-circle distances (and forward/back 
>> azimuths), best-fit great circles, etc.
>>
>> Thanks for any recommendations you might have,
>> Zane
>>
> 
> Zane: Basemap can calculate great-circle distances (with forward/back 
> azimuths). I'm not to clear on the types of transformations you need, 
> but Basemap basically just does the forward and inverse transformations 
> from map projection to geographic (lat/lon) coordinates. My guess is 
> that it won't do the type of rotation and translation that you want to do.
> 
> -Jeff
> 
-- 
Zane Selvans
Amateur Human
za...@id...
303/815-6866
PGP Key: 55E0815F
Zane Selvans wrote:
> Hello all,
>
> I need to do analysis of vector data (linear features, polylines) on 
> the surface of a sphere. Many of the lines span a significant portion 
> of the circumferance of the the body in question (Jupiter's moon 
> Europa), and I want to be able to do the display of the data and 
> analysis within Matplotlib.
>
> Rather than writing my own (probably lame) module for manipulating and 
> generating linear features stored as lists of (lat,lon) points, I'd 
> prefer to build on someone else's work.
>
> After a little searching around, it seems like most open GIS packages 
> (e.g. OGL, GDAL) seem to work exclusively within a projected planar 
> space. Am I missing something? Is there anyone else out there that 
> does this kind of thing? What solutions do people have that work well 
> with Matplotlib and the Basemap toolkit?
>
> Ideally, I'd like to have the ability to perform transformations on 
> the polylines, rotating and translating them on the surface of the 
> sphere (without having to do the spherical trig myself), and I have to 
> be able to have features cross the "date line" and wrap-around 
> intelligently, calculate great-circle distances (and forward/back 
> azimuths), best-fit great circles, etc.
>
> Thanks for any recommendations you might have,
> Zane
>
Zane: Basemap can calculate great-circle distances (with forward/back 
azimuths). I'm not to clear on the types of transformations you need, 
but Basemap basically just does the forward and inverse transformations 
from map projection to geographic (lat/lon) coordinates. My guess is 
that it won't do the type of rotation and translation that you want to do.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449
325 Broadway Boulder, CO, USA 80305-3328
From: Jeff W. <js...@fa...> - 2008年03月15日 01:00:26
Michael Bauer wrote:
> I'd like to make pcolor images using non-'cyl' projections, but I want 
> the pcolor pixels to be trapezoidal rather than rectangular. Is this 
> possible?
>
> Mike
>
> Example script"
>
> # example data
> lonin = numpy.arange(0.,360.,2.5)
> latin = numpy.arange(-90.,92.5,2.5)
> field = numpy.ones([len(latin),len(lonin)]) + 
> 10.0*numpy.random.random([len(latin),len(lonin)])
>
> # adapt for plot
> #field,lons = addcyclic(field,lonin)
> #field,lons = shiftgrid(180.,field,lons,start=False)
> # offset for pcolor
> field = 0.5*(field[:-1,:-1]+field[1:,1:])
>
> fig = figure()
> canvas = FigureCanvas(fig)
> the_map = Basemap(resolution='c',projection='lcc',llcrnrlon=-75.,
> llcrnrlat=15.,urcrnrlon=40.,urcrnrlat=60.,lat_1=50.,
> lon_0=-45.)
>
> # convert to projected coordinates
> dx = 2.*pi*the_map.rmajor/len(lons)
> nx = int((the_map.xmax-the_map.xmin)/dx)+1
> ny = int((the_map.ymax-the_map.ymin)/dx)+1
> z,x,y = 
> the_map.transform_scalar(field,lons,lats,nx,ny,returnxy=True,order=0)
>
> # creates seemingly correct image in term of grid placement, but with 
> rectangular pixels
> the_image = the_map.pcolor(x,y,z,shading='flat')
>
> 
Mike: There's no need to do the interpolation to map projection 
coordinates. Just pass pcolor the vertices of the lat/lon grid in map 
projection coordinates, i.e.
x,y = the_map(lons, lats)
the_image = the_map.pcolor(x,y,field)
The resulting pixels will not be square, but will have the shape of 
lat/lon boxes in projected coordinates.
-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 6 results of 6

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