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


Showing 15 results of 15

From: marcelo <mc...@gm...> - 2013年02月27日 23:31:47
Hello,
Does matplotlib recognize the file generated by a file sink in GNU Radio? I
guess its format is '.dat'.
I want to read the information in this file and create some graphics.
Thanks!
M
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Reading-GRC-file-in-matplotlib-tp40499.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: lkz2366 <ac...@sa...> - 2013年02月27日 23:13:30
Ok, I finally got it working after a couple of hours of experimenting. I
couldn't figure out how to get your methods to work, maybe because I'm such
a novice at Python. But, it was as easy as using a simple 'for' loop.
num = the number of lists to plot
time = a list of lists
volts = a list of lists
figure()
for x in range(0,num):
 plot(time[x],volt[x])
show()
<http://matplotlib.1069221.n5.nabble.com/file/n40498/screenshot.png> 
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Multiple-XY-plots-tp40451p40498.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Paul H. <pmh...@gm...> - 2013年02月27日 21:52:43
On Wed, Feb 27, 2013 at 1:01 AM, Sudheer Joseph <sud...@ya...>wrote:
> Dear Pierre,
> I was checking the plt.xcorr and it calls the
> np.correlate in side it. It calls np.correlate(ts1,ts2, mode=2).
> Is there a way to see which vector is sided back in time? ie
> ts1[t1,t2,t3,t4....] ts2[t1,t2,t3,t4...] ( ts2[t2] correlated with ts1[t1]
> or ts2[t1] is correlated with ts2[t2] ie {to make out which one is the
> cause and which is effect)
> in case of cross correlation it can be obtained by either sliding ts1 back
> in time or ts2 back in time. Is there a way to know this? I am not able to
> make much from np.correlate. Also is there a way to get 95% significance or
> p value from the xcorr.? in case of matlab? in matlab xcorr can be called
> with option of corcoeff instead of default cross correlation but is there
> similar option for matplotlib?
> sincerely.
> Sudheer
>
>
Sudheer:
It sounds like your needs are beyond the scope of matplotlib. It'll
probably be more productive to check in with the numpy or scipy mailing
lists.
-paul
From: Jeff W. - N. F. <jef...@no...> - 2013年02月27日 21:13:39
> Marcello Vichi <mailto:mar...@bo...>
> February 27, 2013 1:40 PM
> Thanks Jeff
>
> this is what I have
>
> In [1]: import matplotlib
> In [2]: matplotlib.__version__
> Out[2]: '1.2.0'
Marcello: As a workaround you could mask the data outside the bounding 
lat of the projection before you draw the contour lines. Something like 
this ought to do it:
from numpy import ma
sst = ma.masked_array(sst, mask=lats>-40)
-Jeff
>
> I also tried with a different dataset, the one from
> http://matplotlib.org/basemap/users/examples.html
> and I get the same problem
>
> from mpl_toolkits.basemap import Basemap
> from netCDF4 import Dataset
> import numpy as np
> import matplotlib.pyplot as plt
> date = '20071215' # date to plot.
> # open dataset for that date.
> dataset = \
> Dataset('http://www.ncdc.noaa.gov/thredds/dodsC/oisst/NetCDF/AVHRR-AMSR/%s/AVHRR-AMSR/amsr-avhrr-v2.%s.nc.gz'% 
>
> (date[0:4],date))
> # read sst. Will automatically create a masked array using
> # missing_value variable attribute. 'squeeze out' singleton dimensions.
> sst = dataset.variables['sst'][:].squeeze()
> # read ice.
> ice = dataset.variables['ice'][:].squeeze()
> # read lats and lons (representing centers of grid boxes).
> lats = dataset.variables['lat'][:]
> lons = dataset.variables['lon'][:]
> # shift lats, lons so values represent edges of grid boxes
> # (as pcolor expects).
> delon = lons[1]-lons[0]; delat = lats[1]-lats[0]
> lons = (lons - 0.5*delon).tolist()
> lons.append(lons[-1]+delon)
> lons = np.array(lons,np.float64)
> lats = (lats - 0.5*delat).tolist()
> lats.append(lats[-1]+delat)
> lats = np.array(lats,np.float64)
> # create figure, axes instances.
> fig = plt.figure()
> ax = fig.add_axes([0.05,0.05,0.9,0.9])
> m = 
> Basemap(projection='spaeqd',lat_0=-90,lon_0=180,resolution='l',boundinglat=-40,round=True) 
>
> x, y = m(*np.meshgrid(lons, lats))
> o=m.drawcoastlines(linewidth=0.25)
> o=m.drawcountries(linewidth=0.25)
> o=m.fillcontinents(color="grey",lake_color='white')
> o=m.drawmeridians(np.arange(0,360,30),labels=[1,1,1,1])
> o=m.drawparallels(np.arange(-90,90,10),labels=[1,1,1,1])
> cim=m.contour(x[:-1,:-1],y[:-1,:-1],sst,arange(2,28,2),linewidths=0.5,colors='k') 
>
> plt.clabel(cim, inline=1, fontsize=10, fmt = '%.1f',)
>
>
>
>
> Jeff Whitaker <mailto:jef...@no...>
> February 27, 2013 11:59 AM
>
>
> Marcello: I cannot reproduce your problem. From the github pull 
> request you mention, it seems like this was fixed about 3 months ago. 
> What version of basemap are you running?
>
> -Jeff
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> Marcello Vichi <mailto:mar...@bo...>
> February 19, 2013 7:33 AM
> When I plot contours in a stereographic south pole plot with a 
> bounding latitude and the rounded clipping
>
> Basemap(projection='spaeqd',lat_0=-90,lon_0=180,resolution='l',boundinglat=-40,round=True) 
>
>
> I see that the contours are correctly cut-off but not the contour 
> labels. They appear to be plotted according to a rectangular frame and 
> not the rounded one (see attached figure).
>
> Is it possible to mask the labels without having to mask the data?
>
> This issue may be related to an older topic:
> http://www.mail-archive.com/mat...@li.../msg02892.html 
>
> and to a more recent bugfix
> https://github.com/matplotlib/basemap/pull/89
> but I do not see any other clue
>
> thanks in advance
>
> marcello
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> ------------------------------------------------------------------------
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Jeff W. - N. F. <jef...@no...> - 2013年02月27日 21:07:55
> Marcello Vichi <mailto:mar...@bo...>
> February 27, 2013 1:40 PM
> Thanks Jeff
>
> this is what I have
>
> In [1]: import matplotlib
> In [2]: matplotlib.__version__
> Out[2]: '1.2.0'
Marcello: I asked what version of basemap you had, not matplotlib. 
Anyway, thanks for providing the script - with it I can reproduce the 
problem. It looks like the Text instances returned by clabel are not 
being clipped properly. Unfortunately, I don't have any idea why. I'll 
get back to you if I find a solution.
BTW: you don't need to shift the lons and lats to represent the center 
of the gridbox (that's only needed for pcolor).
-Jeff
>
> I also tried with a different dataset, the one from
> http://matplotlib.org/basemap/users/examples.html
> and I get the same problem
>
> from mpl_toolkits.basemap import Basemap
> from netCDF4 import Dataset
> import numpy as np
> import matplotlib.pyplot as plt
> date = '20071215' # date to plot.
> # open dataset for that date.
> dataset = \
> Dataset('http://www.ncdc.noaa.gov/thredds/dodsC/oisst/NetCDF/AVHRR-AMSR/%s/AVHRR-AMSR/amsr-avhrr-v2.%s.nc.gz'% 
>
> (date[0:4],date))
> # read sst. Will automatically create a masked array using
> # missing_value variable attribute. 'squeeze out' singleton dimensions.
> sst = dataset.variables['sst'][:].squeeze()
> # read ice.
> ice = dataset.variables['ice'][:].squeeze()
> # read lats and lons (representing centers of grid boxes).
> lats = dataset.variables['lat'][:]
> lons = dataset.variables['lon'][:]
> # shift lats, lons so values represent edges of grid boxes
> # (as pcolor expects).
> delon = lons[1]-lons[0]; delat = lats[1]-lats[0]
> lons = (lons - 0.5*delon).tolist()
> lons.append(lons[-1]+delon)
> lons = np.array(lons,np.float64)
> lats = (lats - 0.5*delat).tolist()
> lats.append(lats[-1]+delat)
> lats = np.array(lats,np.float64)
> # create figure, axes instances.
> fig = plt.figure()
> ax = fig.add_axes([0.05,0.05,0.9,0.9])
> m = 
> Basemap(projection='spaeqd',lat_0=-90,lon_0=180,resolution='l',boundinglat=-40,round=True) 
>
> x, y = m(*np.meshgrid(lons, lats))
> o=m.drawcoastlines(linewidth=0.25)
> o=m.drawcountries(linewidth=0.25)
> o=m.fillcontinents(color="grey",lake_color='white')
> o=m.drawmeridians(np.arange(0,360,30),labels=[1,1,1,1])
> o=m.drawparallels(np.arange(-90,90,10),labels=[1,1,1,1])
> cim=m.contour(x[:-1,:-1],y[:-1,:-1],sst,arange(2,28,2),linewidths=0.5,colors='k') 
>
> plt.clabel(cim, inline=1, fontsize=10, fmt = '%.1f',)
>
>
>
>
> Jeff Whitaker <mailto:jef...@no...>
> February 27, 2013 11:59 AM
>
>
> Marcello: I cannot reproduce your problem. From the github pull 
> request you mention, it seems like this was fixed about 3 months ago. 
> What version of basemap are you running?
>
> -Jeff
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> Marcello Vichi <mailto:mar...@bo...>
> February 19, 2013 7:33 AM
> When I plot contours in a stereographic south pole plot with a 
> bounding latitude and the rounded clipping
>
> Basemap(projection='spaeqd',lat_0=-90,lon_0=180,resolution='l',boundinglat=-40,round=True) 
>
>
> I see that the contours are correctly cut-off but not the contour 
> labels. They appear to be plotted according to a rectangular frame and 
> not the rounded one (see attached figure).
>
> Is it possible to mask the labels without having to mask the data?
>
> This issue may be related to an older topic:
> http://www.mail-archive.com/mat...@li.../msg02892.html 
>
> and to a more recent bugfix
> https://github.com/matplotlib/basemap/pull/89
> but I do not see any other clue
>
> thanks in advance
>
> marcello
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> ------------------------------------------------------------------------
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Marcello V. <mar...@bo...> - 2013年02月27日 20:41:32
Thanks Jeff
this is what I have
In [1]: import matplotlib
In [2]: matplotlib.__version__
Out[2]: '1.2.0'
I also tried with a different dataset, the one from
http://matplotlib.org/basemap/users/examples.html
and I get the same problem
from mpl_toolkits.basemap import Basemap
from netCDF4 import Dataset
import numpy as np
import matplotlib.pyplot as plt
date = '20071215' # date to plot.
# open dataset for that date.
dataset = \
Dataset('http://www.ncdc.noaa.gov/thredds/dodsC/oisst/NetCDF/AVHRR-AMSR/%s/AVHRR-AMSR/amsr-avhrr-v2.%s.nc.gz'%
 (date[0:4],date))
# read sst. Will automatically create a masked array using
# missing_value variable attribute. 'squeeze out' singleton dimensions.
sst = dataset.variables['sst'][:].squeeze()
# read ice.
ice = dataset.variables['ice'][:].squeeze()
# read lats and lons (representing centers of grid boxes).
lats = dataset.variables['lat'][:]
lons = dataset.variables['lon'][:]
# shift lats, lons so values represent edges of grid boxes
# (as pcolor expects).
delon = lons[1]-lons[0]; delat = lats[1]-lats[0]
lons = (lons - 0.5*delon).tolist()
lons.append(lons[-1]+delon)
lons = np.array(lons,np.float64)
lats = (lats - 0.5*delat).tolist()
lats.append(lats[-1]+delat)
lats = np.array(lats,np.float64)
# create figure, axes instances.
fig = plt.figure()
ax = fig.add_axes([0.05,0.05,0.9,0.9])
m = 
Basemap(projection='spaeqd',lat_0=-90,lon_0=180,resolution='l',boundinglat=-40,round=True)
x, y = m(*np.meshgrid(lons, lats))
o=m.drawcoastlines(linewidth=0.25)
o=m.drawcountries(linewidth=0.25)
o=m.fillcontinents(color="grey",lake_color='white')
o=m.drawmeridians(np.arange(0,360,30),labels=[1,1,1,1])
o=m.drawparallels(np.arange(-90,90,10),labels=[1,1,1,1])
cim=m.contour(x[:-1,:-1],y[:-1,:-1],sst,arange(2,28,2),linewidths=0.5,colors='k')
plt.clabel(cim, inline=1, fontsize=10, fmt = '%.1f',)
On 27/02/13 19:59, Jeff Whitaker wrote:
>
>
>> Marcello Vichi <mailto:mar...@bo...>
>> February 19, 2013 7:33 AM
>> When I plot contours in a stereographic south pole plot with a
>> bounding latitude and the rounded clipping
>>
>> Basemap(projection='spaeqd',lat_0=-90,lon_0=180,resolution='l',boundinglat=-40,round=True)
>>
>>
>> I see that the contours are correctly cut-off but not the contour
>> labels. They appear to be plotted according to a rectangular frame and
>> not the rounded one (see attached figure).
>>
>> Is it possible to mask the labels without having to mask the data?
>>
>> This issue may be related to an older topic:
>> http://www.mail-archive.com/mat...@li.../msg02892.html
>>
>> and to a more recent bugfix
>> https://github.com/matplotlib/basemap/pull/89
>> but I do not see any other clue
>>
>> thanks in advance
>>
>> marcello
> Marcello: I cannot reproduce your problem. From the github pull request
> you mention, it seems like this was fixed about 3 months ago. What
> version of basemap are you running?
>
> -Jeff
-- 
Dr Marcello Vichi
Centro Euro-Mediterraneo sui Cambiamenti Climatici (CMCC)
Istituto Nazionale di Geofisica e Vulcanologia (INGV)
Viale Aldo Moro 44, 40127 Bologna. Italy
Tel: +39 051 3782631 Fax: +39 051 3782654
Email: mar...@cm..., mar...@bo...
skype: marcello_vichi
From: Thomas S. <spr...@hd...> - 2013年02月27日 20:01:50
I'd say it's got nearly nothing to do with matplotlib.
The question is: will the font be included in the .ps and in the .pdf?
If not, which is most likely, it's upon the renderer to decide what to do if the requested glyph in the requested font is present or not in the system.
pdf is more likely to have the fonts / glyphs used also embeded in the pdf. One reason for them to be bigger than .ps. Ps, on the other hand, most of the times relys on the renderer to have the exact same font, referenced by name, pre-loaded in the system. Go figure.
To sum it up: use the old 7-bit equivalent for the degree sign, not any fancydancy UTF-8 character that is commonly not included in ye olde style postscript standard font embedded into your laser printer waaaay back then in the last millenium... 
Am 26.02.2013 um 21:26 schrieb Gökhan Sever:
> 
> 
> On Tue, Feb 26, 2013 at 8:29 AM, Pierre Haessig <pie...@cr...> wrote:
> Le 26/02/2013 14:38, Gökhan Sever a écrit :
>> 
>> Could you test my outputs if they look fine on your side?
>> 
>> http://atmos.uwyo.edu/~gsever/data/matplotlib/test.pdf
>> http://atmos.uwyo.edu/~gsever/data/matplotlib/test.ps
>> 
> Good idea ! 
> 
> * your PDF file looks fine with Okular
> * your PS indeed has the problem you describe (again Okular) :
> - "°" (degree sign) is fine
> - but "0" (zero superscript) is replaced by "?"
> 
> In case it may explain the difference : I'm using mpl 1.1.1rc2 from Debian testing
> and I have the following line in my matplotlibrc (is it relevant ???)
> 
> font.sans-serif : DejaVu Sans, sans-serif
> 
> Best,
> Pierre
> 
> My matplotlib is a git clone of a couple weeks old. 
> 
> There is this line in the PS file (opening via vim)
> 
> %%BeginResource: font KDYSTE+NewCenturySchlbk-Roman
> 
> don't know where it gets this.
> 
> #font.serif : DejaVu Serif, Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
> font.sans-serif : DejaVu Sans, Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif
> 
> PS uses that even I choose to use fot.sans-serif.
> 
> Dont see any font specification in the PDF file.
> 
> 
> 
> -- 
> Gökhan ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb_______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Michael D. <md...@st...> - 2013年02月27日 19:48:39
That feature is specific to the Qt4 backend.
Mike
On 02/27/2013 02:23 PM, Jonno wrote:
> Can anyone explain to me why I don't see the "Edit Curves Line and 
> Axes Parameters" button in the matplotlib toolbar when using 
> matplotlib.backends.backend_wxagg.NavigationToolbar2Wx
>
> The example code here creates a Matplotlib plot with the matplotlib 
> toolbar including all buttons except for the one above.
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Jonno <jon...@gm...> - 2013年02月27日 19:24:05
Can anyone explain to me why I don't see the "Edit Curves Line and Axes
Parameters" button in the matplotlib toolbar when using
matplotlib.backends.backend_wxagg.NavigationToolbar2Wx
The example code here creates a Matplotlib plot with the matplotlib toolbar
including all buttons except for the one above.
From: Jeff W. <jef...@no...> - 2013年02月27日 19:01:48
> Marcello Vichi <mailto:mar...@bo...>
> February 19, 2013 7:33 AM
> When I plot contours in a stereographic south pole plot with a 
> bounding latitude and the rounded clipping
>
> Basemap(projection='spaeqd',lat_0=-90,lon_0=180,resolution='l',boundinglat=-40,round=True) 
>
>
> I see that the contours are correctly cut-off but not the contour 
> labels. They appear to be plotted according to a rectangular frame and 
> not the rounded one (see attached figure).
>
> Is it possible to mask the labels without having to mask the data?
>
> This issue may be related to an older topic:
> http://www.mail-archive.com/mat...@li.../msg02892.html 
>
> and to a more recent bugfix
> https://github.com/matplotlib/basemap/pull/89
> but I do not see any other clue
>
> thanks in advance
>
> marcello 
Marcello: I cannot reproduce your problem. From the github pull request 
you mention, it seems like this was fixed about 3 months ago. What 
version of basemap are you running?
-Jeff
From: Paul H. <pmh...@gm...> - 2013年02月27日 16:03:07
On Wed, Feb 27, 2013 at 1:49 AM, Rita <rmo...@gm...> wrote:
> Hi,
>
> I am currently plotting cpu utilization over time (plot_time). I would
> like the color of my line to be red when at 100%. 80-90% a bit less red,
> more yellow, and lower numbers will be green. Any thoughts of doing this?
>
A few years ago, Gökhan Sever posted this technique, which is the simplest
and best I've seen:
##
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
x = np.linspace(0, 3 * np.pi, 5000)
y = np.sin(x)
z = np.cos(0.5 * (x[:-1] + x[1:])) # 1st derivative
cmap_z = cm.coolwarm(z)
fig, ax1 = plt.subplots(nrows=1, ncols=1)
ax1.scatter(x, y, c=cmap_z, marker='_', s=5)
fig.show()
##
From: Jakob G. <ga...@il...> - 2013年02月27日 10:26:27
Hi
have a look at http://matplotlib.org/examples/pylab_examples/multicolored_line.html and
http://matplotlib.org/examples/pylab_examples/show_colormaps.html.
br
Jakob
On 02/27/2013 10:49 AM, Rita wrote:
> Hi,
>
> I am currently plotting cpu utilization over time (plot_time). I would like the color of my line to be
> red when at 100%. 80-90% a bit less red, more yellow, and lower numbers will be green. Any thoughts of
> doing this?
>
>
> --
> --- Get your facts first, then you can distort them as you please.--
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Phil E. <pel...@gm...> - 2013年02月27日 10:13:09
Joe Kington's answer is the best solution I've seen to this problem:
http://stackoverflow.com/questions/13622909/matplotlib-how-to-colorize-a-large-number-of-line-segments-as-independent-gradi
There is also an example in the gallery:
http://matplotlib.org/examples/pylab_examples/multicolored_line.html
HTH
On 27 February 2013 09:49, Rita <rmo...@gm...> wrote:
> Hi,
>
> I am currently plotting cpu utilization over time (plot_time). I would
> like the color of my line to be red when at 100%. 80-90% a bit less red,
> more yellow, and lower numbers will be green. Any thoughts of doing this?
>
>
> --
> --- Get your facts first, then you can distort them as you please.--
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Rita <rmo...@gm...> - 2013年02月27日 09:50:30
Hi,
I am currently plotting cpu utilization over time (plot_time). I would like
the color of my line to be red when at 100%. 80-90% a bit less red, more
yellow, and lower numbers will be green. Any thoughts of doing this?
-- 
--- Get your facts first, then you can distort them as you please.--
From: Sudheer J. <sud...@ya...> - 2013年02月27日 09:02:20
Dear Pierre,
            I was checking the plt.xcorr and it calls the np.correlate in side it. It calls np.correlate(ts1,ts2, mode=2).
Is there a way to see which vector is sided back in time? ie ts1[t1,t2,t3,t4....] ts2[t1,t2,t3,t4...] ( ts2[t2] correlated with ts1[t1] or ts2[t1] is correlated with ts2[t2] ie {to make out which one is the cause and which is effect)
in case of cross correlation it can be obtained by either sliding ts1 back in time or ts2 back in time. Is there a way to know this? I am not able to make much from np.correlate. Also is there a way to get 95% significance or p value from the xcorr.? in case of matlab? in matlab xcorr can be called with option of corcoeff instead of default cross correlation but is there similar option for matplotlib?
sincerely.
Sudheer
          
 
***************************************************************
Sudheer Joseph 
Indian National Centre for Ocean Information Services
Ministry of Earth Sciences, Govt. of India
POST BOX NO: 21, IDA Jeedeemetla P.O.
Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55
Tel:+91-40-23886047(O),Fax:+91-40-23895011(O),
Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile)
E-mail:sjo...@gm...;sud...@ya...
Web- http://oppamthadathil.tripod.com
***************************************************************
________________________________

Showing 15 results of 15

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