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
|
|
From: Sudheer J. <sud...@ya...> - 2013-06-06 10:38:14
|
Dear members, Is there a way to add error bar to pandas ts.plot object?. with best regards, 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 *************************************************************** |
|
From: Michiel de H. <mjl...@ya...> - 2013-06-06 09:52:47
|
Hi all, I am trying to draw a heatmap using matshow, which I then save as a PDF. If I then zoom in in the PDF, I notice that different rows have different sizes, and different columns have different sizes. It seems that some rows/columns have twice the height/width as other rows/columns. Attached is a screenshot of part of the PDF after zooming in. Is there some way to force all rows / columns to have the same height/width? Best, -Michiel. |
|
From: Scott L. <sl...@sp...> - 2013-06-06 03:08:11
|
I have python 3.3.2 from python.org installed as a Framework. I set up a virtualenv to test the script $ virtualenv-3.3 mpl121 --no-site-packages $ .mpl121/bin/activate $ pip-3.3 install numpy $ pip-3.3 install matplotlib With this setup, key events are passed to the window behind the active plot window and no event is printed by the test script. Mouse clicks in the plot window do cause the script to print out the event. I even tried installing 1.4.x into the virtualenv with $ pip-3.3 install git+https://github.com/matplotlib/matplotlib.git#egg=matplotlib The key events were not printed out by the script. I tried creating a different virtualenv using --system-site-packages and the script failed to detect key events. If I deactivate the virtualenvs and run the script with matplotlib-1.4.x-py3.3-macosx-10.6-intel.egg in /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/ the key events are printed by the script. I'm not sure why using matplotlib from a virtualenv causes the key events to be ignored in my setup. I should have stated in my first reply that I used a virtualenv to test 1.2.1 and 1.3.0rc2 but not 1.4.x. Scott On Jun 5, 2013, at 7:49 PM, Michiel de Hoon <mjl...@ya...> wrote: > The script works for me with matplotlib-1.2.1 both with Python2 and with Python3 with the MacOSX backend. > To rule out the usual culprit, is your Python3 installed as a framework? > > Best, > -MIchiel. > > > ----- Original Message ----- > From: Scott Lasley <sl...@sp...> > To: "mat...@li..." <mat...@li...> > Cc: > Sent: Thursday, June 6, 2013 4:50 AM > Subject: Re: [Matplotlib-users] key_press_events on macosx > > > On Jun 5, 2013, at 2:51 PM, Matt Terry <mat...@gm...> wrote: > >> Hi, >> I'm working on a TextBox widget and have run into problems registering key_press_events with the macosx backend. button_press_events work, but key_press_events fail to trigger. If I change backends to tkAgg, everything triggers as expected. >> >> Can anyone reproduce this? >> Run the following script; click the figure and bang on the keyboard. Mouse clicks and keyboard clicks should echo on the screen. I'm using mpl 1.2.1 with Anaconda. >> >> -matt >> >> import pylab as plt >> plt.switch_backend('macosx') >> >> >> def print_event(event): >> print 'event', event >> >> ax = plt.subplot(111) >> fig = ax.figure >> >> x = range(10) >> ax.plot(x, x) >> # mouse clicks work on tkAgg & macosx >> fig.canvas.mpl_connect('button_press_event', print_event) >> # key presses only work on tkAgg >> fig.canvas.mpl_connect('key_press_event', print_event) >> >> plt.show() > > key_press_events in the script fail on my mac running OS X 10.8, python 3.3.2 from python.org and with both matplotlib 1.2.1 installed with pip and matplotlib-1.3.0rc2 from the matplotlib.org download page > > They do work with the latest matplotlib 1.4 from github > > hth, > Scott |
|
From: Matt T. <mat...@gm...> - 2013-06-06 01:23:48
|
I've only tested against the prepackaged python 2.7, mpl 1.2.1 in an
anaconda install. Anaconda is not a framework build.
On Jun 5, 2013 4:50 PM, "Michiel de Hoon" <mjl...@ya...> wrote:
> The script works for me with matplotlib-1.2.1 both with Python2 and with
> Python3 with the MacOSX backend.
> To rule out the usual culprit, is your Python3 installed as a framework?
>
> Best,
> -MIchiel.
>
>
>
>
>
> ----- Original Message -----
> From: Scott Lasley <sl...@sp...>
> To: "mat...@li..." <
> mat...@li...>
> Cc:
> Sent: Thursday, June 6, 2013 4:50 AM
> Subject: Re: [Matplotlib-users] key_press_events on macosx
>
>
> On Jun 5, 2013, at 2:51 PM, Matt Terry <mat...@gm...> wrote:
>
> > Hi,
> > I'm working on a TextBox widget and have run into problems registering
> key_press_events with the macosx backend. button_press_events work, but
> key_press_events fail to trigger. If I change backends to tkAgg,
> everything triggers as expected.
> >
> > Can anyone reproduce this?
> > Run the following script; click the figure and bang on the keyboard.
> Mouse clicks and keyboard clicks should echo on the screen. I'm using mpl
> 1.2.1 with Anaconda.
> >
> > -matt
> >
> > import pylab as plt
> > plt.switch_backend('macosx')
> >
> >
> > def print_event(event):
> > print 'event', event
> >
> > ax = plt.subplot(111)
> > fig = ax.figure
> >
> > x = range(10)
> > ax.plot(x, x)
> > # mouse clicks work on tkAgg & macosx
> > fig.canvas.mpl_connect('button_press_event', print_event)
> > # key presses only work on tkAgg
> > fig.canvas.mpl_connect('key_press_event', print_event)
> >
> > plt.show()
>
> key_press_events in the script fail on my mac running OS X 10.8, python
> 3.3.2 from python.org and with both matplotlib 1.2.1 installed with pip
> and matplotlib-1.3.0rc2 from the matplotlib.org download page
>
> They do work with the latest matplotlib 1.4 from github
>
> hth,
> Scott
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. A cloud service to automate IT design, transition and operations
> 2. Dashboards that offer high-level views of enterprise services
> 3. A single system of record for all IT processes
> http://p.sf.net/sfu/servicenow-d2d-j
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Michiel de H. <mjl...@ya...> - 2013-06-05 23:49:43
|
The script works for me with matplotlib-1.2.1 both with Python2 and with Python3 with the MacOSX backend.
To rule out the usual culprit, is your Python3 installed as a framework?
Best,
-MIchiel.
----- Original Message -----
From: Scott Lasley <sl...@sp...>
To: "mat...@li..." <mat...@li...>
Cc:
Sent: Thursday, June 6, 2013 4:50 AM
Subject: Re: [Matplotlib-users] key_press_events on macosx
On Jun 5, 2013, at 2:51 PM, Matt Terry <mat...@gm...> wrote:
> Hi,
> I'm working on a TextBox widget and have run into problems registering key_press_events with the macosx backend. button_press_events work, but key_press_events fail to trigger. If I change backends to tkAgg, everything triggers as expected.
>
> Can anyone reproduce this?
> Run the following script; click the figure and bang on the keyboard. Mouse clicks and keyboard clicks should echo on the screen. I'm using mpl 1.2.1 with Anaconda.
>
> -matt
>
> import pylab as plt
> plt.switch_backend('macosx')
>
>
> def print_event(event):
> print 'event', event
>
> ax = plt.subplot(111)
> fig = ax.figure
>
> x = range(10)
> ax.plot(x, x)
> # mouse clicks work on tkAgg & macosx
> fig.canvas.mpl_connect('button_press_event', print_event)
> # key presses only work on tkAgg
> fig.canvas.mpl_connect('key_press_event', print_event)
>
> plt.show()
key_press_events in the script fail on my mac running OS X 10.8, python 3.3.2 from python.org and with both matplotlib 1.2.1 installed with pip and matplotlib-1.3.0rc2 from the matplotlib.org download page
They do work with the latest matplotlib 1.4 from github
hth,
Scott
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. A cloud service to automate IT design, transition and operations
2. Dashboards that offer high-level views of enterprise services
3. A single system of record for all IT processes
http://p.sf.net/sfu/servicenow-d2d-j
_______________________________________________
Matplotlib-users mailing list
Mat...@li...
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Scott L. <sl...@sp...> - 2013-06-05 20:07:24
|
On Jun 5, 2013, at 2:51 PM, Matt Terry <mat...@gm...> wrote:
> Hi,
> I'm working on a TextBox widget and have run into problems registering key_press_events with the macosx backend. button_press_events work, but key_press_events fail to trigger. If I change backends to tkAgg, everything triggers as expected.
>
> Can anyone reproduce this?
> Run the following script; click the figure and bang on the keyboard. Mouse clicks and keyboard clicks should echo on the screen. I'm using mpl 1.2.1 with Anaconda.
>
> -matt
>
> import pylab as plt
> plt.switch_backend('macosx')
>
>
> def print_event(event):
> print 'event', event
>
> ax = plt.subplot(111)
> fig = ax.figure
>
> x = range(10)
> ax.plot(x, x)
> # mouse clicks work on tkAgg & macosx
> fig.canvas.mpl_connect('button_press_event', print_event)
> # key presses only work on tkAgg
> fig.canvas.mpl_connect('key_press_event', print_event)
>
> plt.show()
key_press_events in the script fail on my mac running OS X 10.8, python 3.3.2 from python.org and with both matplotlib 1.2.1 installed with pip and matplotlib-1.3.0rc2 from the matplotlib.org download page
They do work with the latest matplotlib 1.4 from github
hth,
Scott
|
|
From: Delosari <lat...@gm...> - 2013-06-05 19:00:02
|
Hi, I have found minor graphical issues while using the spanselector, cursor
and fill_between widgets, which I would like to share with you.
All of them, can be experienced in this code (which I took from the
matplolib example)
"""
The SpanSelector is a mouse widget to select a xmin/xmax range and plot the
detail view of the selected region in the lower axes
"""
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import SpanSelector
import matplotlib.widgets as widgets
Fig = plt.figure(figsize=(8,6))
Fig.set_facecolor('w')
Fig.set
Ax = Fig.add_subplot(211)
x = np.arange(0.0, 5.0, 0.01)
y = np.sin(2*np.pi*x) + 0.5*np.random.randn(len(x))
Ax.plot(x, y, '-')
Ax.set_ylim(-2,2)
Ax.set_title('Press left mouse button and drag to test')
RegionIndices = []
ax2 = Fig.add_subplot(212)
line2, = ax2.plot(x, y, '-')
def onselect(xmin, xmax):
if len(RegionIndices) == 2:
Ax.fill_between(x[:], 0.0, y[:],facecolor='White',alpha=1)
del RegionIndices[:]
indmin, indmax = np.searchsorted(x, (xmin, xmax))
indmax = min(len(x)-1, indmax)
Ax.fill_between(x[indmin:indmax], 0.0,
y[indmin:indmax],facecolor='Blue',alpha=0.30)
thisx = x[indmin:indmax]
thisy = y[indmin:indmax]
line2.set_data(thisx, thisy)
ax2.set_xlim(thisx[0], thisx[-1])
ax2.set_ylim(thisy.min(), thisy.max())
Fig.canvas.draw()
RegionIndices.append(xmin)
RegionIndices.append(xmax)
# set useblit True on gtkagg for enhanced performance
span = SpanSelector(Ax, onselect, 'horizontal', useblit =
True,rectprops=dict(alpha=0.5, facecolor='purple') )
cursor = widgets.Cursor(Ax, color="red", linewidth = 1, useblit = True)
plt.show()
I wonder if there is some way to avoid these two small issues:
1) You can see that when you select a region the spanselector box (purple)
glitches. In this code the effect is barely noticeable but on plots with
many lines is quite annoying (I have tried all the trueblit combinations to
not effect)
2) In this code when you select a region, the area in the upper plot between
the line and the horizontal axis is filled in blue. When you select a new
region the old area is filled in white (to clear it) and the new one is
filled with blue again. However, when I do that the line plotted, as well
as, the horizontal axis, become thicker... Is there a way to clear such a
region (generated with fill_between) without this happening... Or is it
necessary to replot the graph? Initially, I am against doing this since I
have a well structured code and importing all the data again into the
spanselector method seems a bit messy... Which is the right way in python to
delete selected regions of a plot?
Any advice would be most welcome
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Graphics-issues-when-combining-matplotlib-widgets-Spanselector-cursor-fill-between-tp41212.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Matt T. <mat...@gm...> - 2013-06-05 18:51:39
|
Hi,
I'm working on a TextBox widget and have run into problems registering
key_press_events with the macosx backend. button_press_events work, but
key_press_events fail to trigger. If I change backends to tkAgg,
everything triggers as expected.
Can anyone reproduce this?
Run the following script; click the figure and bang on the keyboard. Mouse
clicks and keyboard clicks should echo on the screen. I'm using mpl 1.2.1
with Anaconda.
-matt
import pylab as plt
plt.switch_backend('macosx')
def print_event(event):
print 'event', event
ax = plt.subplot(111)
fig = ax.figure
x = range(10)
ax.plot(x, x)
# mouse clicks work on tkAgg & macosx
fig.canvas.mpl_connect('button_press_event', print_event)
# key presses only work on tkAgg
fig.canvas.mpl_connect('key_press_event', print_event)
plt.show()
|
|
From: Sudheer J. <sud...@ya...> - 2013-06-05 16:32:21
|
Thank you Verymuch for quick help,Paul. with best regards, Sudheer From: Paul Hobson <pmh...@gm...> >To: Sudheer Joseph <sud...@ya...> >Cc: "mat...@li..." <mat...@li...> >Sent: Wednesday, 5 June 2013 9:57 PM >Subject: Re: [Matplotlib-users] time series > > > >On Wed, Jun 5, 2013 at 9:13 AM, Sudheer Joseph <sud...@ya...> wrote: > >Dear Users, >> Is there any other method in matplotlib to get the plot similar to the one there in below link? >> >> >>http://dsnra.jpl.nasa.gov/software/Python/scikits/lib.plotting.examples.html >>I tried using this package but get below error. >> >> >>sjo@sjo-ltp../hourly_rama~$ python ts.py >>Traceback (most recent call last): >> File "ts.py", line 12, in <module> >> fsp = fig.add_tsplot(111) >> File "/usr/local/lib/python2.7/dist-packages/scikits.timeseries-0.91.3-py2.7-linux-x86_64.egg/scikits/timeseries/lib/plotlib.py", line 1284, in add_tsplot >> return add_generic_subplot(self, *args, **kwargs) >> File "/usr/local/lib/python2.7/dist-packages/scikits.timeseries-0.91.3-py2.7-linux-x86_64.egg/scikits/timeseries/lib/plotlib.py", line 177, in add_generic_subplot >> if key in figure_instance._seen: >>AttributeError: 'TimeSeriesFigure' object has no attribute '_seen' >> >> >>######################################## >> >> >>import numpy as np >>import matplotlib.pyplot as plt >>import scikits.timeseries as ts >>import scikits.timeseries.lib.plotlib as tpl >>from scikits.timeseries.lib.moving_funcs import mov_average_expw >> >> >># generate some random data >>data = np.cumprod(1 + np.random.normal(0, 1, 300)/100) >>series = ts.time_series(data, >> start_date=ts.Date(freq='M', year=1982, month=1)) >>fig = tpl.tsfigure() >>fsp = fig.add_tsplot(111) >>fsp.tsplot(series, '-', mov_average_expw(series, 40), 'r--') >>plt.show() >> >> > > >Pandas has excellent time series handling and plotting capabilities. http://pandas.pydata.org/pandas-docs/stable/timeseries.html > >http://pandas.pydata.org/pandas-docs/stable/visualization.html > > > |
|
From: Paul H. <pmh...@gm...> - 2013-06-05 16:27:53
|
On Wed, Jun 5, 2013 at 9:13 AM, Sudheer Joseph <sud...@ya...>wrote: > Dear Users, > Is there any other method in matplotlib to get the plot > similar to the one there in below link? > > > http://dsnra.jpl.nasa.gov/software/Python/scikits/lib.plotting.examples.html > I tried using this package but get below error. > > sjo@sjo-ltp../hourly_rama~$ python ts.py > Traceback (most recent call last): > File "ts.py", line 12, in <module> > fsp = fig.add_tsplot(111) > File > "/usr/local/lib/python2.7/dist-packages/scikits.timeseries-0.91.3-py2.7-linux-x86_64.egg/scikits/timeseries/lib/plotlib.py", > line 1284, in add_tsplot > return add_generic_subplot(self, *args, **kwargs) > File > "/usr/local/lib/python2.7/dist-packages/scikits.timeseries-0.91.3-py2.7-linux-x86_64.egg/scikits/timeseries/lib/plotlib.py", > line 177, in add_generic_subplot > if key in figure_instance._seen: > AttributeError: 'TimeSeriesFigure' object has no attribute '_seen' > > ######################################## > > import numpy as np > import matplotlib.pyplot as plt > import scikits.timeseries as ts > import scikits.timeseries.lib.plotlib as tpl > from scikits.timeseries.lib.moving_funcs import mov_average_expw > > # generate some random data > data = np.cumprod(1 + np.random.normal(0, 1, 300)/100) > series = ts.time_series(data, > start_date=ts.Date(freq='M', year=1982, month=1)) > fig = tpl.tsfigure() > fsp = fig.add_tsplot(111) > fsp.tsplot(series, '-', mov_average_expw(series, 40), 'r--') > plt.show() > > Pandas has excellent time series handling and plotting capabilities. http://pandas.pydata.org/pandas-docs/stable/timeseries.html http://pandas.pydata.org/pandas-docs/stable/visualization.html |
|
From: Sudheer J. <sud...@ya...> - 2013-06-05 16:14:02
|
Dear Users, Is there any other method in matplotlib to get the plot similar to the one there in below link? http://dsnra.jpl.nasa.gov/software/Python/scikits/lib.plotting.examples.html I tried using this package but get below error. sjo@sjo-ltp../hourly_rama~$ python ts.py Traceback (most recent call last): File "ts.py", line 12, in <module> fsp = fig.add_tsplot(111) File "/usr/local/lib/python2.7/dist-packages/scikits.timeseries-0.91.3-py2.7-linux-x86_64.egg/scikits/timeseries/lib/plotlib.py", line 1284, in add_tsplot return add_generic_subplot(self, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/scikits.timeseries-0.91.3-py2.7-linux-x86_64.egg/scikits/timeseries/lib/plotlib.py", line 177, in add_generic_subplot if key in figure_instance._seen: AttributeError: 'TimeSeriesFigure' object has no attribute '_seen' ######################################## import numpy as np import matplotlib.pyplot as plt import scikits.timeseries as ts import scikits.timeseries.lib.plotlib as tpl from scikits.timeseries.lib.moving_funcs import mov_average_expw # generate some random data data = np.cumprod(1 + np.random.normal(0, 1, 300)/100) series = ts.time_series(data, start_date=ts.Date(freq='M', year=1982, month=1)) fig = tpl.tsfigure() fsp = fig.add_tsplot(111) fsp.tsplot(series, '-', mov_average_expw(series, 40), 'r--') plt.show() *************************************************************** 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 *************************************************************** |
|
From: Benjamin R. <ben...@ou...> - 2013-06-04 13:11:04
|
On Tue, Jun 4, 2013 at 3:58 AM, trendelkamp <tre...@ze...>wrote: > Hi, > > there is a minor bug in the axes.twiny() function. Apparently the > parent axes xlim() values are not copied. > Example: > > from numpy import * > import matplotlib.pyplot as plt > > x=linspace(-2.0, 2.0, 100) > y=x**2 > > fig=plt.figure() > ax1=fig.add_subplot(111) > ax1.plot(x, y) > > ax2=ax1.twiny() > ax1.get_xlim() --> (-2.0, 2.0) > ax2.get_xlim() --> (0.0, 1.0) > > It is simple to fix by hand, but I do not think that this is the desired > behavior. > > I can see the argument for copying the x limits, but let's dig further here. Should we also copy the autoscalex switch? The x-axis ticks/tickers/tick formatters? Right now, the way it works, the x-axis in the new axes object is set up just like any other axes, with only the y-axis properties tied together. I personally prefer simplicity and consistency over "magic". Every time I make an axes, it is set up the same way. We are about ready to re-examine our limit handling code soon, so this is a good question to ask in that light. One of the things we are looking to do is to have a concept of "null limits" (in other words, limits that have yet to be explicitly set). It may make sense at that point to consider such behaviors as what you suggest. Cheers! Ben Root |
|
From: trendelkamp <tre...@ze...> - 2013-06-04 07:58:21
|
Hi, there is a minor bug in the axes.twiny() function. Apparently the parent axes xlim() values are not copied. Example: from numpy import * import matplotlib.pyplot as plt x=linspace(-2.0, 2.0, 100) y=x**2 fig=plt.figure() ax1=fig.add_subplot(111) ax1.plot(x, y) ax2=ax1.twiny() ax1.get_xlim() --> (-2.0, 2.0) ax2.get_xlim() --> (0.0, 1.0) It is simple to fix by hand, but I do not think that this is the desired behavior. Thanks, Benjamin |
|
From: Michael D. <md...@st...> - 2013-06-03 14:31:26
|
Have you tried setting the `LC_ALL` to `en_US` before starting up Python? Mike On 06/03/2013 09:10 AM, Clément Mayet wrote: > > Yes, I've tried this : > locale.setlocale(locale.LC_ALL,'en_US') > mpl.rcParams['axes.formatter.use_locale'] = True > > But it has no effect. > > > 2013/6/3 Skip Montanaro <sk...@po... <mailto:sk...@po...>> > > > In my mpl.rcParams, 'axes.formatter.use_locale' is set to False. > > Have you tried setting this value to True? > > Skip > > > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Clément M. <cm...@gm...> - 2013-06-03 13:10:30
|
Yes, I've tried this : locale.setlocale(locale.LC_ALL,'en_US') mpl.rcParams['axes.formatter.use_locale'] = True But it has no effect. 2013/6/3 Skip Montanaro <sk...@po...> > > In my mpl.rcParams, 'axes.formatter.use_locale' is set to False. > > Have you tried setting this value to True? > > Skip > |
|
From: Skip M. <sk...@po...> - 2013-06-03 12:25:00
|
> In my mpl.rcParams, 'axes.formatter.use_locale' is set to False. Have you tried setting this value to True? Skip |
|
From: Clément M. <cm...@gm...> - 2013-06-03 11:14:45
|
Hi all,
I would like to know how to set locale settings for matplotlib.
When I use the plot_date function, labels are in french (my system's
default locale). I would like english. I tried to set locale and it works
ok with strftime :
import locale
print(locale.getlocale())
('fr_FR', 'UTF-8')
mydate=dates.datetime.date(1950,1,15)
mydate.strftime('%A %d %B %Y')
Out[19]: 'dimanche 15 janvier 1950'
locale.setlocale(locale.LC_ALL,'en_US')
Out[21]: 'en_US'
mydate.strftime('%A %d %B %Y')
Out[22]: 'Sunday 15 January 1950'
But this has no effect on the plot_date results...
In my mpl.rcParams, 'axes.formatter.use_locale' is set to False.
How can I set locale configuration for matplotlib ?
Any advice welcome !
Thank you !
Clement
|
|
From: Matthias B. <bus...@gm...> - 2013-06-03 07:23:30
|
Hi Pierre, Thanks for asking on the ML for me :-) I dived into the code and came up with a PR (link at the end) In short, in the constructor of Ticks , self.gridOn is set to the value of rcParam.axes.grid regardless of wether the Ticks is Major or Minor. I proposed one fix, but I'm not sure it is the right one and will wait for feedback. Also My PR will probably conflict with a bigger one so I suppose I won't be in the priority list. Thanks, -- Matthias (Pierre, BTW, nice blog post.) https://github.com/matplotlib/matplotlib/pull/2110 Le 3 juin 2013 à 09:09, Pierre Haessig a écrit : > Le 31/05/2013 13:15, Pierre Haessig a écrit : >> Would it make sense to add also grid.major.* and grid.minor.* (as it >> already exists for xticks) ? > any feedback ? > -- > Pierre > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Pierre H. <pie...@cr...> - 2013-06-03 07:09:25
|
Le 31/05/2013 13:15, Pierre Haessig a écrit : > Would it make sense to add also grid.major.* and grid.minor.* (as it > already exists for xticks) ? any feedback ? -- Pierre |
|
From: Skip M. <sk...@po...> - 2013-05-31 15:40:43
|
> Would you mind opening up an issue on github - this is definitely > a bug (http://matplotlib.org/faq/troubleshooting_faq.html). Done: https://github.com/matplotlib/matplotlib/issues/2104 Skip |
|
From: Phil E. <pel...@gm...> - 2013-05-31 15:33:56
|
Agreed. I've seen this a couple of times but never reproduced it so elegantly. Would you mind opening up an issue on github - this is definitely a bug (http://matplotlib.org/faq/troubleshooting_faq.html). Thanks! P.S. Welcome to the mailinglist :-) On 31 May 2013 16:02, Skip Montanaro <sk...@po...> wrote: > I'm not sure of the correct protocol (I just subscribed to report this > problem), but the documentation said to report bugs here, and I saw no > mention of this in Google searches of the list archives. > > The exception_to_str() function was changed between mpl 1.1 and 1.2. > In my installation I show it going from this: > > def exception_to_str(s = None): > > sh = StringIO.StringIO() > if s is not None: print >>sh, s > traceback.print_exc(file=sh) > return sh.getvalue() > > to this: > > def exception_to_str(s=None): > > sh = io.StringIO() > if s is not None: > print(s, file=sh) > traceback.print_exc(file=sh) > return sh.getvalue() > > At first glance, the change seems innocuous enough, but I think it > introduced an error. (It appears that mpl 1.2 is supposed to work on > Python 2.7 and 3.x.) From a thread I started on comp.lang.python > (http://thread.gmane.org/gmane.comp.python.general/733938), it appears > that io.StringIO instances only accept Unicode strings as input. > Unless v 1.2 is only supposed to run on Python 3 (that doesn't seem to > be the case), you need to do something to convert the traceback > module's output to Unicode before feeding to the io.StringIO object. > > Here's a simple demonstration of the problem: > > % python2.7 > Python 2.7.5+ (2.7:93eb15779050, May 30 2013, 15:27:39) > [GCC 4.4.6 [TWW]] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import traceback, StringIO, io > >>> s1 = StringIO.StringIO() > >>> traceback.print_stack(file=s1) > >>> print repr(s1.getvalue()) > ' File "<stdin>", line 1, in <module>\n' > >>> > >>> s2 = io.StringIO() > >>> traceback.print_stack(file=s2) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/home/skipm/x86_64-linux3.1/lib/python2.7/traceback.py", line > 269, in print_stack > print_list(extract_stack(f, limit), file) > File "/home/skipm/x86_64-linux3.1/lib/python2.7/traceback.py", line > 23, in print_list > ' File "%s", line %d, in %s' % (filename,lineno,name)) > File "/home/skipm/x86_64-linux3.1/lib/python2.7/traceback.py", line > 13, in _print > file.write(str+terminator) > TypeError: unicode argument expected, got 'str' > > Skip Montanaro > sk...@po... > > > ------------------------------------------------------------------------------ > Get 100% visibility into Java/.NET code with AppDynamics Lite > It's a free troubleshooting tool designed for production > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://p.sf.net/sfu/appdyn_d2d_ap2 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Skip M. <sk...@po...> - 2013-05-31 15:02:54
|
I'm not sure of the correct protocol (I just subscribed to report this
problem), but the documentation said to report bugs here, and I saw no
mention of this in Google searches of the list archives.
The exception_to_str() function was changed between mpl 1.1 and 1.2.
In my installation I show it going from this:
def exception_to_str(s = None):
sh = StringIO.StringIO()
if s is not None: print >>sh, s
traceback.print_exc(file=sh)
return sh.getvalue()
to this:
def exception_to_str(s=None):
sh = io.StringIO()
if s is not None:
print(s, file=sh)
traceback.print_exc(file=sh)
return sh.getvalue()
At first glance, the change seems innocuous enough, but I think it
introduced an error. (It appears that mpl 1.2 is supposed to work on
Python 2.7 and 3.x.) From a thread I started on comp.lang.python
(http://thread.gmane.org/gmane.comp.python.general/733938), it appears
that io.StringIO instances only accept Unicode strings as input.
Unless v 1.2 is only supposed to run on Python 3 (that doesn't seem to
be the case), you need to do something to convert the traceback
module's output to Unicode before feeding to the io.StringIO object.
Here's a simple demonstration of the problem:
% python2.7
Python 2.7.5+ (2.7:93eb15779050, May 30 2013, 15:27:39)
[GCC 4.4.6 [TWW]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import traceback, StringIO, io
>>> s1 = StringIO.StringIO()
>>> traceback.print_stack(file=s1)
>>> print repr(s1.getvalue())
' File "<stdin>", line 1, in <module>\n'
>>>
>>> s2 = io.StringIO()
>>> traceback.print_stack(file=s2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/skipm/x86_64-linux3.1/lib/python2.7/traceback.py", line
269, in print_stack
print_list(extract_stack(f, limit), file)
File "/home/skipm/x86_64-linux3.1/lib/python2.7/traceback.py", line
23, in print_list
' File "%s", line %d, in %s' % (filename,lineno,name))
File "/home/skipm/x86_64-linux3.1/lib/python2.7/traceback.py", line
13, in _print
file.write(str+terminator)
TypeError: unicode argument expected, got 'str'
Skip Montanaro
sk...@po...
|
|
From: Sudheer J. <sud...@ya...> - 2013-05-31 13:50:24
|
Thank you both Paul and Eric the kind helping hands, Sudheer |
|
From: Pierre H. <pie...@cr...> - 2013-05-31 11:15:18
|
Hi, A friend was just asking me about how to set grid style in matplotlibrc to separate settings for minor and major grids. As far as I understand, it's not possible because the rc file only includes the following options : grid.color, grid.linestyle and grid.linewidth Would it make sense to add also grid.major.* and grid.minor.* (as it already exists for xticks) ? best, Pierre Sorry if this question was already discussed. I though it was, but a few Google searches didn't point me to relevant content. |
|
From: Eric F. <ef...@ha...> - 2013-05-31 03:13:04
|
On 2013/05/30 3:42 PM, Paul Hobson wrote:
>
>
>
> On Thu, May 30, 2013 at 6:28 PM, Sudheer Joseph
> <sud...@ya... <mailto:sud...@ya...>> wrote:
>
> Dear Users,
> Is there a way to set font size of error bar plot
> axis? I tried below one but get error that "'ErrorbarContainer'
> object has no attribute 'xaxis'"
> any help??
>
Paul is correct ("plt.tick_params(labelsize=14)"), but in addition, the
error you are making is that errorbar does not return an Axes. To get a
reference to the Axes you could follow the call to plt.errorbar() with
"ax = plt.gca()".
> ax=plt.errorbar(y,x,err,label='STDV')
> plt.xlim(0,110)
> for tick in ax.xaxis.get_major_ticks():
> tick.label.set_fontsize(14)
>
>
> Use ax.tick_params
> (http://matplotlib.org/api/axes_api.html?highlight=tick_params#matplotlib.axes.Axes.tick_params).
>
> Hope that helps,
> -paul
>
>
>
> ------------------------------------------------------------------------------
> Get 100% visibility into Java/.NET code with AppDynamics Lite
> It's a free troubleshooting tool designed for production
> Get down to code-level detail for bottlenecks, with <2% overhead.
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap2
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|