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
(10) |
2
(10) |
3
(8) |
4
(6) |
5
(10) |
6
(1) |
7
(3) |
8
|
9
(5) |
10
(4) |
11
(9) |
12
(6) |
13
(12) |
14
(3) |
15
(2) |
16
(13) |
17
(7) |
18
(14) |
19
(7) |
20
(3) |
21
(1) |
22
|
23
(8) |
24
(6) |
25
(3) |
26
(5) |
27
(10) |
28
(5) |
29
(1) |
30
(7) |
|
|
|
|
|
From: Goyo <goy...@gm...> - 2012-04-19 17:22:06
|
El día 19 de abril de 2012 05:31, questions anon <que...@gm...> escribió: > Thank you, I was able to get it to work but only if I imported datetime > within the loop, otherwise I ended up with the > AttributeError: type object 'datetime.datetime' has no attribute 'datetime' > and if I added 'import datetime' at the top of my script it had an error > where I loop through combining each month > " stop_month = datetime(2011, 03, 01) > TypeError: 'module' object is not callable" If you can write a standalone, minimal executable script which reproduces the problem I'll take a look. Send it as an attachement and add sample data files if necessary. Goyo |
From: Ken S. <ke...@se...> - 2012-04-19 15:52:40
|
I think I get what the problem really is. The mouse input is apparently asynchronous and re-entrant rather than queued. That is my mouse handlers are getting called while in progress (e.g. it continues to run continuously while "stopped" on a breakpoint inside a mouse handler). This causes all manner of mischief. So the issue is not about missing events, but rather that the order of events is being screwed up by re-entrancy. Is this a property of tk (I'm familiar with many event-driven GUIs, but not very familiar with tk)? I'm guessing that a good possible solution might be to queue the mouse events myself, and then handle them in the right order. Any other suggestions? On 4/19/2012 7:43 AM, Ken Seehart wrote: > Mouse input occasionally apparently loses mouse events. The effect is > a sometimes "sticky" quality to the mouse. I believe this is due to > incorrect handling of the mouse input queue in the main loop. > > Getting a mouse input queue right is a bit tricky in the presence of > latency since you can't be looking at the mouse state at every > nanosecond, and therefore inevitably miss some events. However, it > should be possible to guarantee the following absolutes with a correct > implementation, regardless of factors such as cpu load associated with > the handlers: > > 1. If the mouse is currently lingering at some location, the most > recent move event should be at this final position. > 2. If the mouse button is currently lingering in an up state, there > must be a mouse up that is more recent than mouse down. > 3. If the mouse button is currently lingering in a down state, there > must be a mouse down that is more recent than mouse up. > 4. The mouse button state for any mouse event should be consistent > with the most recent mouse up/down event. > > Currently, none of the first three are guaranteed, but I'm not certain > about the fourth. I think this should be considered a high priority > defect because it impacts the feel of all matplotlib applications that > use the mouse (i.e. although it's not a show stopper for most apps, it > is important because it affects a very large number of apps). > > How to reproduce: > Make an application with a dragable object, and add some heavy duty > computation in the mouse handlers to create extra latency. > Item 1 can be demonstrated by moving the mouse rapidly back and forth > and then stopping. Occasionally the object will not be where the mouse > settles. Sometimes it appears that the mouse events are queued up in > the wrong order (i.e. the object jumps back to a previous mouse > position). > Items 2 and 3 are very intermittent, but can be achieved by lots of > jerky motion while clicking. Sometimes the object will "stick" to the > mouse (i.e. the final mouse up was lost). > > Note that the issue is not simply the jumpy quality, as that is > obviously to be expected when the handler is slow. Rather the issue is > that the mouse state does not always "settle" into the correct final > state after motion. Be sure that you understand this point clearly > before responding. > > Fixing this would result is a much smoother mouse feel. :-) > > Does the Matplotlib project have a public bug tracking system > somewhere? I can't seem to find it. > > > > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Ken S. <ke...@se...> - 2012-04-19 15:08:33
|
Mouse input occasionally apparently loses mouse events. The effect is a sometimes "sticky" quality to the mouse. I believe this is due to incorrect handling of the mouse input queue in the main loop. Getting a mouse input queue right is a bit tricky in the presence of latency since you can't be looking at the mouse state at every nanosecond, and therefore inevitably miss some events. However, it should be possible to guarantee the following absolutes with a correct implementation, regardless of factors such as cpu load associated with the handlers: 1. If the mouse is currently lingering at some location, the most recent move event should be at this final position. 2. If the mouse button is currently lingering in an up state, there must be a mouse up that is more recent than mouse down. 3. If the mouse button is currently lingering in a down state, there must be a mouse down that is more recent than mouse up. 4. The mouse button state for any mouse event should be consistent with the most recent mouse up/down event. Currently, none of the first three are guaranteed, but I'm not certain about the fourth. I think this should be considered a high priority defect because it impacts the feel of all matplotlib applications that use the mouse (i.e. although it's not a show stopper for most apps, it is important because it affects a very large number of apps). How to reproduce: Make an application with a dragable object, and add some heavy duty computation in the mouse handlers to create extra latency. Item 1 can be demonstrated by moving the mouse rapidly back and forth and then stopping. Occasionally the object will not be where the mouse settles. Sometimes it appears that the mouse events are queued up in the wrong order (i.e. the object jumps back to a previous mouse position). Items 2 and 3 are very intermittent, but can be achieved by lots of jerky motion while clicking. Sometimes the object will "stick" to the mouse (i.e. the final mouse up was lost). Note that the issue is not simply the jumpy quality, as that is obviously to be expected when the handler is slow. Rather the issue is that the mouse state does not always "settle" into the correct final state after motion. Be sure that you understand this point clearly before responding. Fixing this would result is a much smoother mouse feel. :-) Does the Matplotlib project have a public bug tracking system somewhere? I can't seem to find it. |
From: Pietro <pet...@gm...> - 2012-04-19 12:46:56
|
Hi, I'm new to this mailing list, I'm writing here because I was not able to solve searching in the web. I would like to display subplot data divided per week, I write this code: https://gist.github.com/2412755 But I have 2 problems that I would like to solve: 1) I would like to see the xticks label for the first plot too, at the moment it is shown only for the second subplot. 2) I would like to move the xticks label of 0.5 of the xticks width, at the moment I have: # +-------+-------+-------+-------+-------+-------+--------+ # 04/02 04/03 04/04 04/02 04/03 04/04 04/04 # Mon Tue Wed Thu Fri Sat Sun and I would like this: # +-------+-------+-------+-------+-------+-------+--------+ # 04/02 04/03 04/04 04/02 04/03 04/04 04/04 # Mon Tue Wed Thu Fri Sat Sun Any hints? Pietro |
From: Jae-Joon L. <lee...@gm...> - 2012-04-19 05:39:38
|
Handling alpha can become very tricky with matplotlib. The problem is not specific for legend thing, but how attribute of patches are updated when the update_from method is called. Here is an example. from matplotlib.patches import Patch pa1 = Patch(alpha=None, fc='none', ec='b') pb1 = Patch(alpha=1, fc='none', ec='b') pa2 = Patch() pb2 = Patch() pa2.update_from(pa1) pb2.update_from(pb1) assert pa1.get_fc() == pa2.get_fc() assert pb1.get_fc() == pb2.get_fc() And the second assertion fails. fc="none" sets facecolor to (0,0,0,0) but when update_from is called, somehow its alpha value is overridden to 1 (because of alpha=1). This seems to be a bug and maybe we need to tweak the update_from method to get it right. But others may think differently. I'll file an issue with it. Meanwhile, please explicitly set fill=False to avoid filling. e.g., ax.fill(y,x, label='alpha=1', alpha=0.5, fc='none', ec='r', fill=False) Regards, -JJ On Tue, Apr 17, 2012 at 12:49 AM, Paul Hobson <pmh...@gm...> wrote: > On Mon, Apr 16, 2012 at 4:58 AM, Yannick Copin > <yan...@la...> wrote: >> Hi List, >> >> I think I found a bug in legend of a fill command (see attached code and >> figure) when the facecolor is 'none' but the alpha is not None (I'm using >> latest matplotlib 1.1.0). If confirmed, should I fill in a but report? > > I see identical behavior in Christoph Gohlke's Windows build of > Matplotlib 1.2.X for Python 3.2. > > The same thing occurs if you remove the "alpha=None" altogether. > -paul > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: questions a. <que...@gm...> - 2012-04-19 03:32:01
|
Thank you, I was able to get it to work but only if I imported datetime within the loop, otherwise I ended up with the AttributeError: type object 'datetime.datetime' has no attribute 'datetime' and if I added 'import datetime' at the top of my script it had an error where I loop through combining each month " stop_month = datetime(2011, 03, 01) TypeError: 'module' object is not callable" It seems very messy with importing datetime everywhere but I am not sure what the problem is. Below is the code I am using that works: import numpy as np import matplotlib.pyplot as plt from numpy import ma as MA from mpl_toolkits.basemap import Basemap from datetime import datetime import os from StringIO import StringIO from osgeo import gdal, gdalnumeric, ogr, osr import glob from datetime import date, timedelta import matplotlib.dates as mdates import time rainmax=[] rainmin=[] rainmean=[] yearmonthlist=[] yearmonth_int=[] OutputFolder=r"E:/test_out/" GLOBTEMPLATE = r"e:/Rainfall/rainfall-{year}/r{year}{month:02}??.txt" def accumulate_month(year, month): files = glob.glob(GLOBTEMPLATE.format(year=year, month=month)) monthlyrain=[] for ifile in files: f=np.genfromtxt(ifile,skip_header=6) monthlyrain.append(f) import datetime yearmonth=datetime.datetime(year,month,1) yearmonthlist.append(yearmonth) yearmonthint=str(year)+str(month) from datetime import date, datetime d=datetime.strptime(yearmonthint, '%Y%m') date_string=d.strftime('%Y%m') yearmonthint=int(date_string) yearmonth_int.append(yearmonthint) r_max, r_mean, r_min=MA.max(monthlyrain), MA.mean(monthlyrain), MA.min(monthlyrain) rainmax.append(r_max) rainmean.append(r_mean) rainmin.append(r_min) ###loop through months and years stop_month = datetime(2011, 12, 31) month = datetime(2011, 01, 01) while month < stop_month: accumulate_month(month.year, month.month) month += timedelta(days=32) month = month.replace(day=01) ### Plot timeseries of max data x=yearmonthlist y=rainmax x2=yearmonth_int print x, y, x2 fig, ax=plt.subplots(1) z=np.polyfit(x2,y,1) p=np.poly1d(z) plt.plot(x,y) plt.plot(x,p(x2),'r--') #add trendline to plot print "y=%.6fx+(%.6f)"%(z[0],z[1]) fig.autofmt_xdate() ax.fmt_xdata=mdates.DateFormatter('%Y%m') ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y%m')) plt.xlabel("year-month") plt.ylabel("Precipitation (mm)") plt.title("Max monthly precipition") plt.savefig(OutputFolder+"MaxMonthlyPrecip.png") plt.show() On Thu, Apr 19, 2012 at 2:52 AM, Goyo <goy...@gm...> wrote: > El día 18 de abril de 2012 07:59, questions anon > <que...@gm...> escribió: > > I am not exactly sure how to use datetime objects instead of strings. > > This is the code I am working with at the moment and the code works > except > > for the dates, they are just weird numbers along the x-axis. > > Seems like you're plotting yearmonthlist in the x axis, which is a > list of strings and each string is the concatenation of the string > representations of two numbers. So numbers in the x axis are to be > expected. > > You can create datetime objects this way: > > d = datetime.datetime(year, month, 1) > > Then create an array of datetime objects and use it as the x parameter to > plot. > > Goyo > |
From: Joshua L. <jos...@gm...> - 2012-04-18 23:25:04
|
I am running into problems where histograms are not autoscaling correctly. I have filed a bug report on github: https://github.com/matplotlib/matplotlib/issues/841 Below is a copy of the github bug report: --- I am running into problems where histograms are not autoscaling correctly. Below is a very simple example which reproduces this problem: ``` import pylab as P P.hist([3000,3010, 3012], histtype='step') P.savefig('test.pdf') ``` When I run this example using matplotlib v1.1.0 or using the absolute latest version of matplotlib, I obtain an axes which varies from 3000<x<3012 and 0<y<3000 with no visible histogram. When I add (before saving the plot) the line: ``` P.gca().set_ylim(ymax=2.1) ``` I get a reasonable axes range and can see the histogram. I also get a reasonable axes range when I remove the command histtype='step' or when I use matplotlib v1.0.0. Thanks for your help, Joshua |
From: Benjamin R. <ben...@ou...> - 2012-04-18 19:34:21
|
On Wed, Apr 18, 2012 at 3:27 PM, José Alexandre Nalon <na...@te...>wrote: > Hello, > > > Feel free to add a feature request to github. I know I already have a >> long list there, but in a few weeks I should be able to hack at them >> again and that list is what will help me remember what needs to be done. >> >> Oh, and of course, patches are always welcomed! Even if it is >> incomplete, I could take it as a starting point and clean it up. >> > > Ben, thanks for your answer. I don't have experience enough with a > project with the size of matplotlib to put my hands in it without > guidance; however, if you are willing to help me through the process, > I can try to make a patch, and I might be able to help in the future. > > If you can direct me to a function you implemented that used the > approach you suggested, I will try to understand the code and > implement it. If it is good enough, I will submit a patch. > > Thanks again. > > > Jose, Here is an example of how PolyCollection is converted into 3D: http://matplotlib.sourceforge.net/examples/mplot3d/polys3d_demo.html Of course, stem() doesn't create poly collections (I am actually not sure what it creates), but it is likely that art3d has a converter for it. Note, not all 2d collections and artists have converters. Does that help? Ben Root |
From: Benjamin R. <ben...@ou...> - 2012-04-18 18:54:59
|
On Wed, Apr 18, 2012 at 2:41 PM, José Alexandre Nalon <na...@te...>wrote: > Hello, > > I need to plot 2d sequences of two kinds. I wanted them to look like > a stem plot because of other plots that are in the same text. > > There are actually two kinds of plots that I need: one is a standard > two-dimensional domain, with points in the domain over a rectangular > grid; the other is a two-variable function of one independent variable: > I need this to plot complex-sequences, with the markers around a > baseline. > > If I couldn't make myself clear, the first one is like the image in > the link below: > > http://www.mathworks.com/help/techdoc/ref/stem3.html > > I couldn't find a link to an image similar to the second kind, though. > But this one is less important, as I can plot real and imaginary parts > in different axes. > > I could get something that looked ok using scatter3d. If there is a > way to emulate the stem behaviour using that, I think it is ok. But > I thought that probably there is a better way to do it. Any help is > appreciated. > > There is not something that exists right now to do that, but there isn't anything preventing that from being made except not having time to make it. Just as a rough outline of how I would approach it would be to take the output of the 2d stem function, break it down into the constituent parts (multiple collections there, I think), and pass them through the appropriate 2d_to_3d functions that are available in art3d.py (I think that is the right file). This is the general idea for many of the current mplot3d functions. the 2d_to_3d conversion step is what adds third dimension information. Feel free to add a feature request to github. I know I already have a long list there, but in a few weeks I should be able to hack at them again and that list is what will help me remember what needs to be done. Oh, and of course, patches are always welcomed! Even if it is incomplete, I could take it as a starting point and clean it up. Cheers! Ben Root |
From: José A. N. <na...@te...> - 2012-04-18 18:42:02
|
Hello, I need to plot 2d sequences of two kinds. I wanted them to look like a stem plot because of other plots that are in the same text. There are actually two kinds of plots that I need: one is a standard two-dimensional domain, with points in the domain over a rectangular grid; the other is a two-variable function of one independent variable: I need this to plot complex-sequences, with the markers around a baseline. If I couldn't make myself clear, the first one is like the image in the link below: http://www.mathworks.com/help/techdoc/ref/stem3.html I couldn't find a link to an image similar to the second kind, though. But this one is less important, as I can plot real and imaginary parts in different axes. I could get something that looked ok using scatter3d. If there is a way to emulate the stem behaviour using that, I think it is ok. But I thought that probably there is a better way to do it. Any help is appreciated. -- José Alexandre Nalon na...@te... |
From: Benjamin R. <ben...@ou...> - 2012-04-18 18:40:43
|
On Wed, Apr 18, 2012 at 12:40 PM, hari jayaram <ha...@gm...> wrote: > Hi > I am fairly new to matplotlib. > > I have 384 x,y plots that I want to arrange into a 24 by 16 array of > subplots with each subplot being at-least 4 inches by 4 inches. > > I am creating the figure using a large size so that everything will fit > > fig = plt.figure(figsize=(96,64),dpi=72) > > I then have my for loop go through my data-structure and add the > subplots to this figure. In addition , each subplot has four > data-ranges plotted into it. > > ax = fig.add_subplot(24,16,index + 1) > par1 = ax.twinx() > par2 = ax.twinx() > par3 = ax.twinx() > par4 = ax.twinx() > par1.plot(xs,ys,"o",xcalc,ycalc) > par2.plot(xcalc,my_derivative,color="black") > par4.plot(xcalc,my_unsmooth_derivative,color="cyan") > > In the present form I create a one pane window that shows all 384 > plots and then navigate between the plots using pan. > > My question is : Is there a more elegant way to do this? . Is there a > way instead to create a small shrunken down figure and then zoom in > one cell at a time?. The figure navigation controls only zoom with > respect to an axes. Is there a way to zoom w.r.t the whole figure > interactively. > > > Thanks for your help > > Hari > > mpl_toolkits.axes_grid1 can allow you to "share" all of the axes. All x and y lims will be the same and any change to one will reflect everywhere else. Does that help? Ben Root |
From: Christoph G. <cg...@uc...> - 2012-04-18 17:47:15
|
On 4/18/2012 7:00 AM, Werner F. Bruhin wrote: > On 18/02/2010 22:41, Werner F. Bruhin wrote: >> Using numpy with "/arch nosse" solved the issue. >> >> Probably OT here, but does anyone know if numpy will in the future be >> able to dynamically switch on/off the SSEx support? > I am running again into crashes with matplotlib/numpy on Windows XP > running on AMD Athlon type machiens. > > I distribute the application with py2exe, so on my machine I install > numpy with "/arch nosse". > > This works on a test machine with my older program version which uses > Python 2.5, matplotlib 0.99 and numpy 1.0.4, now with my newer stuff I > use Python 2.6, still matplotlib 0.99 and numpy 1.3 (as there is no > 1.0.4 for Py 2.6), with this configuration my program crashes on the > Athlon CPU. > > Tried upgrading to 1.4.1 and 1.5.1 of numpy (still using /arch nosse) > but still see the same crash with an error code of "0xc000001d". > > Short term a 1.0.4 for Python 2.6 would be an o.k. work around, but I > really like to get a something better. Would an upgrade of matplotlib help? > > Werner > matplotlib-0.99.3.win32-py2.6 should work with numpy-1.4.1-win32-superpack-python2.6.exe There was a bug prior to 0.99.2 (IIRC) that would crash on older Pentium computers. If matplotlib-0.99.3 does crash with numpy-1.4.1, please send a small script and let us know exactly where and in which module it crashes, and the capabilities/model of your processor. If possible, upgrade to numpy 1.6.1 and matplotlib 1.1. Christoph |
From: Goyo <goy...@gm...> - 2012-04-18 16:52:51
|
El día 18 de abril de 2012 07:59, questions anon <que...@gm...> escribió: > I am not exactly sure how to use datetime objects instead of strings. > This is the code I am working with at the moment and the code works except > for the dates, they are just weird numbers along the x-axis. Seems like you're plotting yearmonthlist in the x axis, which is a list of strings and each string is the concatenation of the string representations of two numbers. So numbers in the x axis are to be expected. You can create datetime objects this way: d = datetime.datetime(year, month, 1) Then create an array of datetime objects and use it as the x parameter to plot. Goyo |
From: Benjamin R. <ben...@ou...> - 2012-04-18 16:52:45
|
On Wed, Apr 18, 2012 at 10:00 AM, Werner F. Bruhin <wer...@fr...>wrote: > On 18/02/2010 22:41, Werner F. Bruhin wrote: > > Using numpy with "/arch nosse" solved the issue. > > > > Probably OT here, but does anyone know if numpy will in the future be > > able to dynamically switch on/off the SSEx support? > I am running again into crashes with matplotlib/numpy on Windows XP > running on AMD Athlon type machiens. > > I distribute the application with py2exe, so on my machine I install > numpy with "/arch nosse". > > This works on a test machine with my older program version which uses > Python 2.5, matplotlib 0.99 and numpy 1.0.4, now with my newer stuff I > use Python 2.6, still matplotlib 0.99 and numpy 1.3 (as there is no > 1.0.4 for Py 2.6), with this configuration my program crashes on the > Athlon CPU. > > Tried upgrading to 1.4.1 and 1.5.1 of numpy (still using /arch nosse) > but still see the same crash with an error code of "0xc000001d". > > Short term a 1.0.4 for Python 2.6 would be an o.k. work around, but I > really like to get a something better. Would an upgrade of matplotlib > help? > > Werner > > I think we have some confusion for version numbers. There was never a version 1.0.4 of mpl. There was a version 1.0.1, but not 1.0.4. Also, you mention numpy version 1.0.4, I certainly would hope you are referring to numpy 1.4.0. Could you please double-check your version numbers so we can get a better idea of what is happening? Thanks, Ben Root |
From: hari j. <ha...@gm...> - 2012-04-18 16:41:05
|
Hi I am fairly new to matplotlib. I have 384 x,y plots that I want to arrange into a 24 by 16 array of subplots with each subplot being at-least 4 inches by 4 inches. I am creating the figure using a large size so that everything will fit fig = plt.figure(figsize=(96,64),dpi=72) I then have my for loop go through my data-structure and add the subplots to this figure. In addition , each subplot has four data-ranges plotted into it. ax = fig.add_subplot(24,16,index + 1) par1 = ax.twinx() par2 = ax.twinx() par3 = ax.twinx() par4 = ax.twinx() par1.plot(xs,ys,"o",xcalc,ycalc) par2.plot(xcalc,my_derivative,color="black") par4.plot(xcalc,my_unsmooth_derivative,color="cyan") In the present form I create a one pane window that shows all 384 plots and then navigate between the plots using pan. My question is : Is there a more elegant way to do this? . Is there a way instead to create a small shrunken down figure and then zoom in one cell at a time?. The figure navigation controls only zoom with respect to an axes. Is there a way to zoom w.r.t the whole figure interactively. Thanks for your help Hari |
From: francesco o. <fra...@gm...> - 2012-04-18 14:34:54
|
Hi Werner Il giorno 18 aprile 2012 16:00, Werner F. Bruhin <wer...@fr...> ha scritto: > On 18/02/2010 22:41, Werner F. Bruhin wrote: > > Using numpy with "/arch nosse" solved the issue. > > > > Probably OT here, but does anyone know if numpy will in the future be > > able to dynamically switch on/off the SSEx support? > I am running again into crashes with matplotlib/numpy on Windows XP > running on AMD Athlon type machiens. > > I distribute the application with py2exe, so on my machine I install > numpy with "/arch nosse". > > This works on a test machine with my older program version which uses > Python 2.5, matplotlib 0.99 and numpy 1.0.4, now with my newer stuff I > use Python 2.6, still matplotlib 0.99 and numpy 1.3 (as there is no > 1.0.4 for Py 2.6), with this configuration my program crashes on the > Athlon CPU. > > Tried upgrading to 1.4.1 and 1.5.1 of numpy (still using /arch nosse) > but still see the same crash with an error code of "0xc000001d". > > Short term a 1.0.4 for Python 2.6 would be an o.k. work around, but I > really like to get a something better. Would an upgrade of matplotlib > help? > > Usually upgrading your software helps! :) > Werner > > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Cordiali saluti, Dr.Oteri Francesco |
From: Werner F. B. <wer...@fr...> - 2012-04-18 14:00:14
|
On 18/02/2010 22:41, Werner F. Bruhin wrote: > Using numpy with "/arch nosse" solved the issue. > > Probably OT here, but does anyone know if numpy will in the future be > able to dynamically switch on/off the SSEx support? I am running again into crashes with matplotlib/numpy on Windows XP running on AMD Athlon type machiens. I distribute the application with py2exe, so on my machine I install numpy with "/arch nosse". This works on a test machine with my older program version which uses Python 2.5, matplotlib 0.99 and numpy 1.0.4, now with my newer stuff I use Python 2.6, still matplotlib 0.99 and numpy 1.3 (as there is no 1.0.4 for Py 2.6), with this configuration my program crashes on the Athlon CPU. Tried upgrading to 1.4.1 and 1.5.1 of numpy (still using /arch nosse) but still see the same crash with an error code of "0xc000001d". Short term a 1.0.4 for Python 2.6 would be an o.k. work around, but I really like to get a something better. Would an upgrade of matplotlib help? Werner |
From: Naljer <mn...@go...> - 2012-04-18 11:29:07
|
Hi, I would like to use the pre-installed backends like TKAgg an so on with python2.7. My standard-python is 2.6 and python 2.7 doesnt find the backends. python2.7: import matplotlib matplotlib.use('TkAgg') from pylab import * error something like: no tkinter installed Please help! :-) -- View this message in context: http://old.nabble.com/install-link-matplotlib-backend-in-parallel-python-version-tp33707166p33707166.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Chao Y. <cha...@gm...> - 2012-04-18 08:49:47
|
Dear all, I draw a scatter plot. it returns matplotlib.collections.PathCollection object. then how can I set the size of the markers? for a matplotlib.lines.Line2D object, there is a method set_markersize which can be used to set markersize. but no such method for matplotlib.collections.PathCollection object? thanks et cheers, Chao -- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************ |
From: questions a. <que...@gm...> - 2012-04-18 05:59:57
|
I am not exactly sure how to use datetime objects instead of strings. This is the code I am working with at the moment and the code works except for the dates, they are just weird numbers along the x-axis. Any help will be greatly appreciated. import numpy as np import matplotlib.pyplot as plt from numpy import ma as MA from mpl_toolkits.basemap import Basemap from datetime import datetime import os from osgeo import gdal, gdalnumeric, ogr, osr import glob from datetime import date, timedelta import matplotlib.dates as mdates import time rainmax=[] yearmonthlist=[] yearmonth_int=[] OutputFolder=r"E:/test_out/" GLOBTEMPLATE = r"e:/Rainfall/rainfall-{year}/r{year}{month:02}??.txt" def accumulate_month(year, month): files = glob.glob(GLOBTEMPLATE.format(year=year, month=month)) monthlyrain=[] monthlyrainaust=[] for ifile in files: f=np.genfromtxt(ifile,skip_header=6) monthlyrain.append(f) yearmonth=str(year)+str(month) d=datetime.strptime(yearmonth, '%Y%m') date_string=d.strftime('%Y%m') yearmonthint=int(date_string) yearmonth_int.append(yearmonthint) yearmonthlist.append(yearmonth) r_max=np.max(monthlyrain) rainmax.append(r_max) ###loop through months and years stop_month = datetime(2011, 04, 01) month = datetime(2011, 01, 01) while month < stop_month: accumulate_month(month.year, month.month) month += timedelta(days=32) month = month.replace(day=01) x=yearmonthlist y=rainmax x2=yearmonth_int print x, y, x2 fig, ax=plt.subplots(1) z=np.polyfit(x2,y,1) p=np.poly1d(z) plt.plot(x,y) plt.plot(x,p(x2),'r--') #add trendline to plot print "y=%.6fx+(%.6f)"%(z[0],z[1]) fig.autofmt_xdate() ax.fmt_xdata=mdates.DateFormatter('%Y%m') ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y%m')) plt.xlabel("year-month") plt.ylabel("Precipitation (mm)") plt.title("Max monthly Precipition") plt.savefig(OutputFolder+"MaxMonthlyPrecip.png") plt.show() On Fri, Apr 13, 2012 at 2:31 AM, Goyo <goy...@gm...> wrote: > El día 12 de abril de 2012 03:46, questions anon > <que...@gm...> escribió: > > > I am not sure how to recognise that x-axis are dates like 20110101, > > 20110102, 20110103 etc. > > Use datetime objects instead of strings. > > Goyo > |
From: Jason G. <jas...@cr...> - 2012-04-17 22:28:50
|
On 4/15/12 10:12 AM, Jae-Joon Lee wrote: > Unfortunately, this is something that I haven't considered when > implementing the FancyArrowPatch. > As you may know, FancyArrowPatch is a single patch object (at least > viewed from outside), so you cannot have multiple linestyles that can > be set by users. > > So, one option is to change the implementation to use a hard-coded > line style for arrow heads, but this is not straight forward in fact. That was my conclusion as well. Thanks for confirming. > > Another option is to use custom path effects. Attached is a modified > version of your script with this approach. > Although this makes your code more complicated, this could be the most > straight forward way. Awesome. I've submitted a patch to Sage with your example (and credited you as an author): http://trac.sagemath.org/sage_trac/ticket/12852 Thanks, Jason |
From: Fernando P. <fpe...@gm...> - 2012-04-17 20:20:32
|
Hi folks, A number of you expressed interest in attending the PyData workshop last month and unfortunately we had very tight space restrictions. But thanks to the team at Marakana, who pitched in and were willing to film, edit and post videos for many of the talks, you can access them all here: http://marakana.com/s/2012_pydata_workshop,1090/index.html They are in 720p so you can actually read the terminals, though I think you have to click the YouTube link to be able to change the resolution. Enjoy! f |
From: Benjamin R. <ben...@ou...> - 2012-04-17 12:41:30
|
On Tue, Apr 17, 2012 at 3:16 AM, Sameer Grover <sam...@gm...>wrote: > On Tuesday 17 April 2012 12:36 PM, Abhishek Pratap wrote: > > Hi Guys > > I am starting to render plots with matplotlib as I learn both python and > this interesting plotting library. I need help with a custom plot for a > problem I am working on. May be there is an inbuilt function already. > > Problem: > I am trying to draw a table(rectangle) as a plot with 96 individual cells > ( 8 rows X 12 cols). Color each alternative cell with a specific color ( > like a chess board : instead of black I will use some other color) and > insert value for each cell from a pandas data frame or python dictionary. > Show the col and row labels on the side. > > Sample Data: http://pastebin.com/N4A7gWuH > > Appreciate your input. > > Thanks! > -Abhi > > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free.http://p.sf.net/sfu/Boundary-dev2dev > > > > _______________________________________________ > Matplotlib-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > I think you'll need to use the function imshow with interpolation set to > None. > Sameer > > Actually, interpolation set to 'none', not the Python None. Here is some code: a = np.zeros((8 * 12, 3)) a[::2, 0] = 1.0 # red a[1::2, 2] = 0.75 # blue a.shape = (8, 12, 3) plt.imshow(a, interpolation='none') plt.show() Note that there is currently a bug in plt.imsave() that makes saving this throw an exception (but you can still save using fig.savefig()). Cheers! Ben Root |
From: Ian T. <ian...@gm...> - 2012-04-17 09:42:13
|
On 16 April 2012 23:36, Damon McDougall <D.M...@wa...> wrote: > On Monday, 16 April 2012 at 16:34, Kacper Kowalik wrote: > > > On 16 Apr 2012 22:31, "Damon McDougall" <D.M...@wa...> wrote: > > > > Hi Kacper, > > > > Just to be clear, is it tri.Triangulation(x, y) that hangs, or is it > plt.tricontour(…)? > > It's plt.tricontour that hangs, tri.Triangulation properly issues warning > about duplicates. > Cheers, > Kacper > > > On Monday, 16 April 2012 at 14:28, Kacper Kowalik wrote: > > >> > >> Hi, > >> I haven't been able to pin point it exactly but following script: > >> > >> import matplotlib.pyplot as plt > >> import matplotlib.tri as tri > >> import numpy as np > >> from numpy.random import uniform, seed > >> > >> seed(0) > >> npts = 200 > >> x = uniform(-2,2,npts) > >> y = uniform(-2,2,npts) > >> z = x*np.exp(-x**2-y**2) > >> > >> y[1:3] = x[0] # 4 or more duplicate points make tricontour hang!!! > >> x[1:3] = y[0] > > You should call z = x*np.exp(-x**2-y**2) _before_ changing the points > you're triangulating. > Having said that, I see the same behaviour even if I change the vertices > before I compute z. > > >> triang = tri.Triangulation(x, y) > >> plt.tricontour(x, y, z, 15, linewidths=0.5, colors='k') > >> > >> plt.show() > >> > >> > >> causes infinite loop in _tri.so. It happens in matplotlib-1.1.0 as well > >> as git HEAD. > >> I understand that my input is not exactly valid, but I'd rather see MPL > >> die than occupy my box for eternity ;) > >> Best regards, > >> Kacper > > I think the reason it's hanging is because you're trying to plot the > contours of a function that is defined on an invalid triangulation (edges > cross at points that are not in the vertex set). I think the best way to > deal with this is to write a helper function to check the triangulation is > valid. If it isn't, either tri.Triangulation(x, y) should fail, or the > plotter should fail. > > Anybody else have any suggestions? > We can definitely do better here. I have created a issue request on github: https://github.com/matplotlib/matplotlib/issues/838 and will investigate further. Ian |
From: Sameer G. <sam...@gm...> - 2012-04-17 07:16:21
|
On Tuesday 17 April 2012 12:36 PM, Abhishek Pratap wrote: > Hi Guys > > I am starting to render plots with matplotlib as I learn both python > and this interesting plotting library. I need help with a custom plot > for a problem I am working on. May be there is an inbuilt function > already. > > Problem: > I am trying to draw a table(rectangle) as a plot with 96 individual > cells ( 8 rows X 12 cols). Color each alternative cell with a specific > color ( like a chess board : instead of black I will use some other > color) and insert value for each cell from a pandas data frame or > python dictionary. Show the col and row labels on the side. > > Sample Data: http://pastebin.com/N4A7gWuH > > Appreciate your input. > > Thanks! > -Abhi > > > ------------------------------------------------------------------------------ > Better than sec? Nothing is better than sec when it comes to > monitoring Big Data applications. Try Boundary one-second > resolution app monitoring today. Free. > http://p.sf.net/sfu/Boundary-dev2dev > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users I think you'll need to use the function imshow with interpolation set to None. Sameer |