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: Benjamin R. <ben...@ou...> - 2013-04-14 02:23:10
|
On Sat, Mar 23, 2013 at 12:09 AM, Russell Warren <ru...@pe...> wrote: > I'm trying to use path.Path.contains_point for point-in-polygon testing > and am running into a few different confusing situations. My specific > issues/questions are: > > 1. I'm seeing different behaviour dependent on path direction (clockwise > or counter-clockwise). Is there a "correct" direction to use? > No, it shouldn't matter, AFAICT. If there are differences, then it should be reported as a bug. > > 2. What is the expected behaviour for Path.contains_point when the point > is on a boundary? > > The original algorithm that it was based off of considered it outside (again, from memory), but warns that floating-point errors renders this point largely theoretical. > 3. What is the radius parameter supposed to do? The docs say it "allows > the path to be made slightly larger or smaller", but I'm clearly not > understanding this properly (see the cw_path hit test failure with r=0.1 > below). > > That is a terrible description of the functionality, I agree. Essentially, if you have a positive radius, it effectively dilates the polygon for the purposes of point-testing, while a negative radius effectively erodes the polygon (but not for plotting... only for point testing). > Here is a short example showing some issues with a unit rectangle... > > >>> from matplotlib.path import Path > >>> cw_path = Path([[0,0], [0,1], [1,1], [1,0]]) > >>> ccw_path = Path([[0,0], [1,0], [1,1], [0,1]]) > >>> #Point on x axis not detected for either path... > ... cw_path.contains_point([0.5, 0]) > 0 > >>> ccw_path.contains_point([0.5, 0]) > 0 > >>> #Add a large radius and ccw_path works, but not cw_path (!!?)... > ... r = 0.1 > >>> cw_path.contains_point([0.5, 0], radius=r) > 0 > >>> ccw_path.contains_point([0.5, 0], radius=r) > 1 > > The following ipython notebook has more detailed tests, but the main > points are in the sample above. > http://nbviewer.ipython.org/7e1b347b8b21b338bee1 > > I've found at least one reference [1] online indicating that "this > function is intended for use when mouse-clicking". Does that mean I should > not use it for generic point-in-polygon testing? > > That entirely depends upon your needs. The algorithm has very low overhead, but it isn't highly optimized. This makes it ideal for occasional point tests on arbitrary polygons (such as processing mouse-clicks). But if you want to systematically do many point tests for every single polygon, then maybe a more rigorously designed and implemented algorithm (such as Shapely's) is more suited for your needs. Note that Shapely's algorithm has higher overhead, but can test many more points faster than ours. I hope that clears things up! Ben Root |
|
From: Mark L. <bre...@ya...> - 2013-04-13 19:01:34
|
I've found the solution. MonthLocator doesn't support the bysetpos argument that rrule can use. Thankfully from my POV the following two lines give me exactly what I want. rule = rrulewrapper(MONTHLY, bymonthday=(firstDate.day, -1), bysetpos=1) majorLocator = RRuleLocator(rule) Just wish I'd read the docs more carefully in the first place to save my time and yours. On 05/04/2013 10:17, Mark Lawrence wrote: > On 04/04/2013 19:00, Mark Lawrence wrote: >> Sadly no :( I want the day of the month that I'm processing *OR* the >> last day. The worst case for this is obviously the 31st of each month. >> The rrule code I've given provides exactly that. When transferred to >> mpl that doesn't work. > > Best seen by changing the lines I gave originally to this. > > start = datetime.date(2013, 4, 5) > until = datetime.date(2014, 4, 5) > dates = rrule(MONTHLY, bymonthday=(5, -1), bysetpos=1, until=until) > > rrule output as follows. > > 2013-04-05 10:15:24 > 2013-05-05 10:15:24 > 2013-06-05 10:15:24 > 2013-07-05 10:15:24 > 2013-08-05 10:15:24 > 2013-09-05 10:15:24 > 2013-10-05 10:15:24 > 2013-11-05 10:15:24 > 2013-12-05 10:15:24 > 2014-01-05 10:15:24 > 2014-02-05 10:15:24 > 2014-03-05 10:15:24 > > Plot attached. > >> >> On 04/04/2013 17:31, Phil Elson wrote: >>> Hi Mark, >>> >>> Thanks for persevering :-) >>> >>> What is it you want to achieve? Is it that you just want the last day of >>> each month as the located value? >>> >>> Changing your locator to: >>> >>> ax.xaxis.set_major_locator(MonthLocator(bymonthday = -1)) >>> >>> Seems to do the trick for me (I've never looked at the mpl date magic, >>> so I can give no guarantees). >>> >>> HTH, >>> >>> >>> On 4 April 2013 17:18, Mark Lawrence >>> <bre...@ya... >>> <mailto:bre...@ya...>> wrote: >>> >>> On 01/04/2013 14:48, Mark Lawrence wrote: >>> > On 29/03/2013 15:49, Mark Lawrence wrote: >>> >> Hi all, >>> >> >>> >> From http://labix.org/python-dateutil >>> >> >>> >> "To generate a rrule for the use case of "a date on the >>> specified day of >>> >> the month, unless it is beyond the end of month, in which case >>> it will >>> >> be the last day of the month" use the following: >>> >> >>> >> rrule(MONTHLY, bymonthday=(some_day, -1), bysetpos=1) >>> >> >>> >> This will generate a value for every calendar month regardless >>> of the >>> >> day of the month it is started from." >>> >> >>> >> Using bymonthday with MonthLocator gives ticks on the day given >>> and the >>> >> last day of the month, which looks extremely ugly. Code below >>> demonstrates. >>> >> >>> >> from dateutil.rrule import * >>> >> import datetime >>> >> import matplotlib.pyplot as plt >>> >> from matplotlib.ticker import FormatStrFormatter, >>> MultipleLocator >>> >> from matplotlib.dates import DateFormatter, MonthLocator, >>> DayLocator >>> >> >>> >> start = datetime.date(2013, 3, 29) >>> >> until = datetime.date(2014, 3, 29) >>> >> dates = rrule(MONTHLY, bymonthday=(29, -1), bysetpos=1, >>> until=until) >>> >> for d in dates:print(d) >>> >> >>> >> dates = [start, until] >>> >> values = [0, 1] >>> >> plt.ylabel('Balance') >>> >> plt.grid() >>> >> ax = plt.subplot(111) >>> >> plt.plot_date(dates, values, fmt = 'rx-') >>> >> ax.xaxis.set_major_locator(MonthLocator(bymonthday = >>> (dates[0].day, -1))) >>> >> ax.xaxis.set_major_formatter(DateFormatter('%d/%m/%y')) >>> >> ax.yaxis.set_major_formatter(FormatStrFormatter('£%0.2f')) >>> >> ax.yaxis.set_minor_locator(MultipleLocator(5)) >>> >> plt.axis(xmin=dates[0], xmax=dates[-1]) >>> >> plt.setp(plt.gca().get_xticklabels(), rotation = 45, >>> fontsize = 10) >>> >> plt.setp(plt.gca().get_yticklabels(), fontsize = 10) >>> >> plt.show() >>> >> >>> > >>> > Seems an apt date to realise that I didn't say much :( >>> > >>> > Assuming that I'm correct would you like an issue raised on >>> the bug >>> > tracker? If not please correct the mistake I've made, >>> presumably in >>> > reading the docs, which I think are excellent by the way. >>> > >>> >>> Anybody? >>> >>> -- >>> If you're using GoogleCrap™ please read this >>> http://wiki.python.org/moin/GoogleGroupsPython. >>> >> -- If you're using GoogleCrap™ please read this http://wiki.python.org/moin/GoogleGroupsPython. Mark Lawrence |
|
From: Randy B. L. <mum...@gm...> - 2013-04-13 16:32:09
|
hi, every one: I used to use TkAgg as backend on my macbook for matplotlib which was installed from macports. for a while, the plot window was launched in X11. after a latest macports update, it stopped using x11 instead a standalone python window will be used now. I was wondering if there is a way to instruct matplotlib to open plot window in x11? thanks! -- Randy |
|
From: ChaoYue <cha...@gm...> - 2013-04-12 16:01:26
|
I'm afraid the scatter plot does not allow afterward adjustment with size
currently (by using setp).
Probably you should redraw the scatter points with different sizes. like
for x,y,z in zip(xlist,ylist,sizelist):
m.scatter(x,y,s=z)
if you question is to change the real 2km or 1.5km to the size on the map,
sorry I don't know as I never did this. Probably you need consider
projection.
Chao
On Fri, Apr 12, 2013 at 4:33 PM, marz_cyclone [via matplotlib] <
ml-...@n5...> wrote:
> Hi all,
>
> I'm trying to do a scatter plot within a map created by basemap.
>
> m = Basemap(projection='ortho',lat_0=45,lon_0=0,resolution='l')
> X,Y = m(lon,lat)
> m.scatter(X,Y,s=sizes,c=data,edgecolor='none')
>
> This works fine. Now I want to change the sizes of the markers so that the
> marker at point A has a size that corresponds to circle with radius of 2.5
> km, point B to 1.5 km, .... and so on.
>
> Has anyone ever done this?
>
> Thanks in advance.
>
> Mario Mech
>
>
> ------------------------------------------------------------------------------
>
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Matplotlib-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=40883&i=0>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://matplotlib.1069221.n5.nabble.com/basemap-scatter-tp40883.html
> To start a new topic under matplotlib - users, email
> ml-...@n5...
> To unsubscribe from matplotlib, click here<http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2&code=Y2hhb3l1ZWpveUBnbWFpbC5jb218MnwxMzg1NzAzMzQx>
> .
> NAML<http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
***********************************************************************************
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
************************************************************************************
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/basemap-scatter-tp40883p40884.html
Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Mario M. <me...@me...> - 2013-04-12 14:33:14
|
Hi all, I'm trying to do a scatter plot within a map created by basemap. m = Basemap(projection='ortho',lat_0=45,lon_0=0,resolution='l') X,Y = m(lon,lat) m.scatter(X,Y,s=sizes,c=data,edgecolor='none') This works fine. Now I want to change the sizes of the markers so that the marker at point A has a size that corresponds to circle with radius of 2.5 km, point B to 1.5 km, .... and so on. Has anyone ever done this? Thanks in advance. Mario Mech |
|
From: Michael D. <md...@st...> - 2013-04-12 13:35:44
|
Unfortunately, I don't think there is a way to do this at present. Out of curiosity, what is the use case? I wonder if the best way to do this would be to expose the stroking to the Python level, so given a line one could get a filled path that is the stroked line. I'm not sure how else this could work, since the zooming could be different in each direction, etc., or could even by log-scaled etc. Would you mind creating an issue ticket for this? (Patches welcome, too, of course, and I can provide pointers if you want to take this on yourself...) Mike On 04/12/2013 05:34 AM, Michael Wimmer wrote: > I have a collection of Patches and Lines that have their coordinates in > data space, i.e. like in the following example: > > > import matplotlib.pyplot as plt > import matplotlib.patches as mpatches > import matplotlib.collections as mcollections > import matplotlib.lines as mlines > > fig = plt.figure() > ax = fig.add_subplot(111) > > patches = [] > patches.append(mlines.Line2D((0,1),(0,1), linewidth=1)) > patches.append(mpatches.Circle((0,0), 0.25, linewidth=1)) > patches.append(mpatches.Circle((1,1), 0.25, linewidth=1)) > > coll = mcollections.PatchCollection(patches) > ax.add_collection(coll) > ax.autoscale_view() > > plt.show() > > > Now, in this example the line width is always given with respect to the > screen space, i.e. does not change when I zoom into the plot. Is it > possible to specify a linewidth with respect to data space? I.e. to say > that a line (in both the Line2D and the Circle) should be let's say 0.1 > in data space, and thus scale accordingly if I zoom in? > > -Michael > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: andrew n. <and...@gm...> - 2013-04-12 13:19:26
|
> > Message: 1 > Date: Fri, 12 Apr 2013 13:55:32 +0400 > From: Bakhtiyor Zokhidov <bak...@ma...> > Subject: [Matplotlib-users] Impossible to draw a direction of arrows > in Matplotlib??? > > Hi, > I have encountered some problem while I was drawing a direction of > arrow. I have point (x,y) coordinates and angle of them. What I want to > do is that to draw arrow according to the given angle (just to show the > point direction as an arrow in each point coordinate). Here, we should > assume coordinates of '+x', '+y', '-x ', '-y' are 90, 0, 270, 180 > degrees, respectively.? > I am a bit unfamiliar with Python drawing tools. I am still not sure to > draw directional point (arrow based on angle) whether I use pylab or > some other modules or.. still not sure at all. I put the following codes > as a sample to give better description: I see the potential for some confusion over the direction of arrows on a plot here. In standard trigonometry angles of 0, 90, 180, 270 degrees lie along '+x' (1, 0), '+y' (0, 1), '-x' (-1, 0) and '-y' (0, -1). Totally different to what you want. However, this is obviously different to the compass rose. ________________ Dr Andrew Nelson and...@gm... _________________ |
|
From: Ryan N. <rne...@gm...> - 2013-04-12 12:43:00
|
I'm not sure that I understand exactly what you are trying to do, but
you may want to look into Matplotlib annotation. Here's a really quick
example:
import matplotlib.pyplot as plt
plt.annotate('', (1, 1), (0, 0),
arrowprops=dict(facecolor='black'))
plt.axis([-1, 2, -1, 2])
plt.show()
There are many options to make very fancy arrows, and there are several
places in the docs to read about this in more detail:
http://matplotlib.org/users/annotations_intro.html
http://matplotlib.org/users/annotations_guide.html
Hope that helps a little. Good luck.
Ryan
On 4/12/2013 5:55 AM, Bakhtiyor Zokhidov wrote:
> Hi,
> I have encountered some problem while I was drawing a direction of
> arrow. I have point (x,y) coordinates and angle of them. What I want to
> do is that to draw arrow according to the given angle (just to show the
> point direction as an arrow in each point coordinate). Here, we should
> assume coordinates of '+x', '+y', '-x ', '-y' are 90, 0, 270, 180
> degrees, respectively.
> I am a bit unfamiliar with Python drawing tools. I am still not sure to
> draw directional point (arrow based on angle) whether I use pylab or
> some other modules or.. still not sure at all. I put the following codes
> as a sample to give better description:
>
> import numpy as np
> import scipy as sp
> import pylab as pl
>
>
> def draw_line(x,y,angle):
> # Inputs:
> x = np.array([ 2, 4, 8, 10, 12, 14, 16])
> y = np.array([ 5, 10, 15, 20, 25, 30, 35])
> angles = np.array([45,275,190,100,280,18,45])
>
> # First, draw (x,y) coordinate
> ???
> # Second, according to the angle indicate the direction as
> an arrow
> ???
>
> Thanks in advance for your friendly support,
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Bakhtiyor Z. <bak...@ma...> - 2013-04-12 09:55:44
|
Hi, I have encountered some problem while I was drawing a direction of arrow. I have point (x,y) coordinates and angle of them. What I want to do is that to draw arrow according to the given angle (just to show the point direction as an arrow in each point coordinate). Here, we should assume coordinates of '+x', '+y', '-x ', '-y' are 90, 0, 270, 180 degrees, respectively. I am a bit unfamiliar with Python drawing tools. I am still not sure to draw directional point (arrow based on angle) whether I use pylab or some other modules or.. still not sure at all. I put the following codes as a sample to give better description: import numpy as np import scipy as sp import pylab as pl def draw_line(x,y,angle): # Inputs: x = np.array([ 2, 4, 8, 10, 12, 14, 16]) y = np.array([ 5, 10, 15, 20, 25, 30, 35]) angles = np.array([45,275,190,100,280,18,45]) # First, draw (x,y) coordinate ??? # Second, according to the angle indicate the direction as an arrow ??? Thanks in advance for your friendly support, |
|
From: Michael W. <wim...@gm...> - 2013-04-12 09:34:43
|
I have a collection of Patches and Lines that have their coordinates in data space, i.e. like in the following example: import matplotlib.pyplot as plt import matplotlib.patches as mpatches import matplotlib.collections as mcollections import matplotlib.lines as mlines fig = plt.figure() ax = fig.add_subplot(111) patches = [] patches.append(mlines.Line2D((0,1),(0,1), linewidth=1)) patches.append(mpatches.Circle((0,0), 0.25, linewidth=1)) patches.append(mpatches.Circle((1,1), 0.25, linewidth=1)) coll = mcollections.PatchCollection(patches) ax.add_collection(coll) ax.autoscale_view() plt.show() Now, in this example the line width is always given with respect to the screen space, i.e. does not change when I zoom into the plot. Is it possible to specify a linewidth with respect to data space? I.e. to say that a line (in both the Line2D and the Circle) should be let's say 0.1 in data space, and thus scale accordingly if I zoom in? -Michael |
|
From: Clare S. <cla...@gm...> - 2013-04-12 01:19:13
|
Hi Michiel, I'm using GtkAgg. Please correct me if I'm wrong, but issue 531's problem is with blitting, for me blitting works, I'm able to speed up plotting using canvas.copy_from_bbox(), canvas.restore_region() & canvas.blit(). It's just that after plotting, if I try to pan or zoom using the pan/zoom buttons on the navigation toolbar, whatever I've plotted disappears & the whole thing becomes blank. I'm able to pan/zoom if I use canvas.draw() but plotting is too slow because it redraws everything. Regards, Clare. On Fri, Apr 12, 2013 at 8:22 AM, Michiel de Hoon <mjl...@ya...>wrote: > Hi Clare, > > Which backend are you using, and can you show an example script? > > The blitting functions are a bit unusual as they try to draw stuff to the > figure outside of the event loop. This is e.g. causing problems with > animations, which makes use of the blitting functions. We have been looking > at that recently (see https://github.com/matplotlib/matplotlib/issues/531) > but we haven't come up with a solution yet. Solving this issue may also fix > your problem (which sounds like an event loop problem), so you may want to > follow issue 531. > > Best, > -Michiel. > > --- On *Thu, 4/11/13, Clare Soh <cla...@gm...>* wrote: > > > From: Clare Soh <cla...@gm...> > Subject: [Matplotlib-users] Pan/Zoom can't work with blitting > To: "mat...@li..." < > mat...@li...> > Date: Thursday, April 11, 2013, 5:19 AM > > > Hi, > > To improve plotting speed, I decided > to use blitting(canvas.copy_from_bbox(), canvas.restore_region() & > canvas.blit()) instead of canvas.draw(), however panning & zooming stops > working after this change. Now, when I click on the 'Pan/Zoom' button or > the 'Zoom to rectangle' button on the Navigation Toolbar, my plot becomes > empty. I don't know what's going wrong, can someone please point me in the > right direction? > > Thank you, > Clare. > > -----Inline Attachment Follows----- > > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > > -----Inline Attachment Follows----- > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li...<http://mc/compose?to=...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Michiel de H. <mjl...@ya...> - 2013-04-12 00:22:37
|
Hi Clare, Which backend are you using, and can you show an example script? The blitting functions are a bit unusual as they try to draw stuff to the figure outside of the event loop. This is e.g. causing problems with animations, which makes use of the blitting functions. We have been looking at that recently (see https://github.com/matplotlib/matplotlib/issues/531) but we haven't come up with a solution yet. Solving this issue may also fix your problem (which sounds like an event loop problem), so you may want to follow issue 531. Best, -Michiel. --- On Thu, 4/11/13, Clare Soh <cla...@gm...> wrote: From: Clare Soh <cla...@gm...> Subject: [Matplotlib-users] Pan/Zoom can't work with blitting To: "mat...@li..." <mat...@li...> Date: Thursday, April 11, 2013, 5:19 AM Hi, To improve plotting speed, I decided to use blitting(canvas.copy_from_bbox(), canvas.restore_region() & canvas.blit()) instead of canvas.draw(), however panning & zooming stops working after this change. Now, when I click on the 'Pan/Zoom' button or the 'Zoom to rectangle' button on the Navigation Toolbar, my plot becomes empty. I don't know what's going wrong, can someone please point me in the right direction? Thank you, Clare. -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter -----Inline Attachment Follows----- _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Clare S. <cla...@gm...> - 2013-04-11 09:19:55
|
Hi, To improve plotting speed, I decided to use blitting(canvas.copy_from_bbox(), canvas.restore_region() & canvas.blit()) instead of canvas.draw(), however panning & zooming stops working after this change. Now, when I click on the 'Pan/Zoom' button or the 'Zoom to rectangle' button on the Navigation Toolbar, my plot becomes empty. I don't know what's going wrong, can someone please point me in the right direction? Thank you, Clare. |
|
From: Maximilian T. <fa...@tr...> - 2013-04-11 07:04:51
|
Hi,
for reading the data files you could user np.loadtxt("filename").
I'm not sure what kind of plot you want to create from this data, but
probably you can find an appropriate plotting method on this page:
http://matplotlib.org/mpl_toolkits/mplot3d/tutorial.html
Max
PS: Sorry for not sending my first mail to the list, but you can see it
below
Am 11/04/2013 04:54, schrieb Sayan Chatterjee:
> Thanks Maximillian for your help.
>
> Could you please tell me how to surface plot with those data files using
> Matplotlib?...i.e both reading the data files and then surface plotting
> in matplotlib?
>
> Sayan
>
>
> On 11 April 2013 02:25, Maximilian Trescher <fa...@tr...
> <mailto:fa...@tr...>> wrote:
>
> Hi,
> >
> > *np.savetxt(fname, np.array([pp_za,pv_za]).T, '%f')*
>
> does maybe
>
> np.savetxt(fname, np.array([pp_za,pv_za, np.ones(1000)*t]).T, '%f')
> does what you want? (replace 1000 with approppriate length)
>
> and a comment about:
> > if pp_za[i] < 0:
> > pp_za[i] = 2 - abs(pp_za[i])
> > if pp_za[i] > 2:
> > pp_za[i] = pp_za[i] % 2
>
> in general
>
> pp_za[pp_za < 0] = 2 - abs(pp_za[pp_za < 0])
> pp_za[pp_za > 2] = pp_za[pp_za > 2] % 2
>
> is shorter and much faster.
>
> Max
>
>
>
>
>
>
> --
>
>
> --------------------------------------------------------------------------
> *Sayan Chatterjee*
> Dept. of Physics and Meteorology
> IIT Kharagpur
> Lal Bahadur Shastry Hall of Residence
> Room AB 205
> Mob: +91 9874513565
> blog: www.blissprofound.blogspot.com <http://www.blissprofound.blogspot.com>
>
> Volunteer , Padakshep
> www.padakshep.org <http://www.padakshep.org>
|
|
From: Sayan C. <say...@gm...> - 2013-04-11 02:55:01
|
Thanks Maximillian for your help. Could you please tell me how to surface plot with those data files using Matplotlib?...i.e both reading the data files and then surface plotting in matplotlib? Sayan On 11 April 2013 02:25, Maximilian Trescher <fa...@tr...> wrote: > Hi, > > > > *np.savetxt(fname, np.array([pp_za,pv_za]).T, '%f')* > > does maybe > > np.savetxt(fname, np.array([pp_za,pv_za, np.ones(1000)*t]).T, '%f') > does what you want? (replace 1000 with approppriate length) > > and a comment about: > > if pp_za[i] < 0: > > pp_za[i] = 2 - abs(pp_za[i]) > > if pp_za[i] > 2: > > pp_za[i] = pp_za[i] % 2 > > in general > > pp_za[pp_za < 0] = 2 - abs(pp_za[pp_za < 0]) > pp_za[pp_za > 2] = pp_za[pp_za > 2] % 2 > > is shorter and much faster. > > Max > > > > -- -------------------------------------------------------------------------- *Sayan Chatterjee* Dept. of Physics and Meteorology IIT Kharagpur Lal Bahadur Shastry Hall of Residence Room AB 205 Mob: +91 9874513565 blog: www.blissprofound.blogspot.com Volunteer , Padakshep www.padakshep.org |
|
From: K.-Michael A. <kmi...@gm...> - 2013-04-10 23:32:53
|
The example script 'testgdal.py' is crashing at the point of the
basemap object instantiation:
m = Basemap(llcrnrlon=-119,llcrnrlat=22,urcrnrlon=-64,urcrnrlat=49,
projection='lcc',lat_1=33,lat_2=45,lon_0=-95)
Assertion failed: (0), function query, file AbstractSTRtree.cpp, line 286.
Abort trap: 6
Is there a known workaround?
with basemap version 1.0.2
Best,
Michael
|
|
From: Paul H. <pmh...@gm...> - 2013-04-10 22:03:23
|
On Wed, Apr 10, 2013 at 2:46 PM, Tim Michelsen <tim...@gm...>wrote: > Hello, > how can I show the forecast error for a timeseries? > > Example: > > I am looking for displaying the blue area of: > > http://t3.gstatic.com/images?q=tbn:ANd9GcR9yuoMhiDeqxJVIOmp0EDNS_Sgxhtv4Z-ohlWly6N7zcgf28QD > > Or the violett areas on: > http://www.meteopower.com/typo3temp/pics/3aa4157df7.jpg > > http://t1.gstatic.com/images?q=tbn:ANd9GcQt_l3HXOPigra-9LD5ldvwHytWc2NcP7cySIqp-8HFaOlZ6mrU7w > > > http://matplotlib.org/api/axes_api.html?highlight=error#matplotlib.axes.Axes.errorbar > > Maybe as an envelope of > http://matplotlib.org/examples/pylab_examples/errorbar_subsample.html > > Thanks for any pointers in advance and kind regards, > Timmie > Timmie, I would just use the fill_between method http://matplotlib.org/examples/pylab_examples/fill_between_demo.html?highlight=codex%20fill_between |
|
From: Tim M. <tim...@gm...> - 2013-04-10 21:46:20
|
Hello, how can I show the forecast error for a timeseries? Example: I am looking for displaying the blue area of: http://t3.gstatic.com/images?q=tbn:ANd9GcR9yuoMhiDeqxJVIOmp0EDNS_Sgxhtv4Z-ohlWly6N7zcgf28QD Or the violett areas on: http://www.meteopower.com/typo3temp/pics/3aa4157df7.jpg http://t1.gstatic.com/images?q=tbn:ANd9GcQt_l3HXOPigra-9LD5ldvwHytWc2NcP7cySIqp-8HFaOlZ6mrU7w http://matplotlib.org/api/axes_api.html?highlight=error#matplotlib.axes.Axes.errorbar Maybe as an envelope of http://matplotlib.org/examples/pylab_examples/errorbar_subsample.html Thanks for any pointers in advance and kind regards, Timmie |
|
From: Sayan C. <say...@gm...> - 2013-04-10 17:50:33
|
Dear All,
I have some data files with numpy arrays stored in it in 2 columns. I want
to add a third column with just floating point numbers(not numpy array) and
plot them later with Matplotlib in 3d. How is it done? Could you please
illuminate me?
This is the concerned snippet of the code:
while *t < 1*:
pp_za = pp_init + t*K*np.sin(K*pp_init)
# Periodic Boundary Condition
for i in range(0,999):
if pp_za[i] < 0:
pp_za[i] = 2 - abs(pp_za[i])
if pp_za[i] > 2:
pp_za[i] = pp_za[i] % 2
pv_za = +K*np.sin(K*pp_init)
fname = 'file_' + str(t) + '.dat'
# Generating dataset for Phase Space diagram
*np.savetxt(fname, np.array([pp_za,pv_za]).T, '%f')*
t = t + 0.01
And the sample data generated is :
0.105728 0.098678
0.126865 0.118406
0.147998 0.138128
0.169126 0.157845
0.190247 0.177556
0.211362 0.197259
0.232469 0.216955
0.253567 0.236643
0.274657 0.256321
0.295737 0.275989
0.316806 0.295646
Precisely what I want is, I want to add the 't' (over which the while loop
is run) in the 3 rd column. 't' is float and constant for each looping. If
you know what a phase plot is(doesn't matter if you don't), I want to see
the phase plot evolving with time. Thus the need of a time axis and hence
plot with V(velocity-Yaxis), X ( Position -X axis) and t (Time-Z axis).Once
the data files are created properly, how to plot them using Matplotlib?
Regards,
Sayan
--
--------------------------------------------------------------------------
*Sayan Chatterjee*
Dept. of Physics and Meteorology
IIT Kharagpur
Lal Bahadur Shastry Hall of Residence
Room AB 205
Mob: +91 9874513565
blog: www.blissprofound.blogspot.com
Volunteer , Padakshep
www.padakshep.org
|
|
From: Will W. <wil...@gm...> - 2013-04-10 04:57:20
|
Answering my own question - the solution is to add a binding to the save
button, and prevent the event from propagating after calling new_save() by
adding 'return "break"' at the end:
def new_save(self, *args, **kwargs):
print 'save_figure pressed'
return "break"
get_current_fig_manager().toolbar.bsave.bind('<Button-1>', new_save)
I would still like to know why the mechanism that works for the Home button
fails for the Save button though...
Will
On Wed, Apr 10, 2013 at 12:00 PM, Will Woods <wil...@gm...> wrote:
> Hmm, problems with html, will try again in plain text:
>
>
> I'm trying to override the behaviour of the toolbar, with partial success.
>
> This works:
>
>
> from matplotlib.backend_bases import NavigationToolbar2
>
> home = NavigationToolbar2.home
>
> def new_home(self, *args, **kwargs):
> print 'home pressed'
> home(self, *args, **kwargs)
>
> NavigationToolbar2.home = new_home
>
>
>
>
> ...but this doesn't:
>
>
>
>
> from matplotlib.backend_bases import NavigationToolbar2
>
> save_figure = NavigationToolbar2.save_figure
>
> def new_save(self, *args, **kwargs):
> print 'save_figure pressed'
> save_figure(self, *args, **kwargs)
>
> NavigationToolbar2.save_figure = new_save
>
>
>
>
> Having actually created a figure, I can get a bound method for save_figure:
>
>
> get_current_fig_manager().toolbar.save_figure()
>
>
>
> This I can override, and call my override function successfully from my
> script - but pressing the save button on the toolbar doesn't call my
> function...
>
> I'm running matplotlib 1.1.1rc and python 2.7.3
>
> Thanks,
>
> Will
>
>
>
>
>
>
>
>
> On Wed, Apr 10, 2013 at 11:55 AM, Willw <wil...@gm...> wrote:
>
>> I'm trying to override the behaviour of the toolbar, with partial success.
>>
>> This works:
>>
>>
>>
>> ...but this doesn't:
>>
>>
>>
>> Having actually created a figure, I can get a bound method for
>> save_figure:
>>
>>
>>
>> This I can override, and call my override function successfully from my
>> script - but pressing the save button on the toolbar doesn't call my
>> function...
>>
>> I'm running matplotlib 1.1.1rc and python 2.7.3
>>
>> Thanks,
>>
>> Will
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://matplotlib.1069221.n5.nabble.com/Overriding-Save-button-on-Toolbar-tp40864.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Precog is a next-generation analytics platform capable of advanced
>> analytics on semi-structured data. The platform includes APIs for building
>> apps and a phenomenal toolset for data science. Developers can use
>> our toolset for easy data analysis & visualization. Get a free account!
>> http://www2.precog.com/precogplatform/slashdotnewsletter
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
|
|
From: Will W. <wil...@gm...> - 2013-04-10 02:00:35
|
Hmm, problems with html, will try again in plain text:
I'm trying to override the behaviour of the toolbar, with partial success.
This works:
from matplotlib.backend_bases import NavigationToolbar2
home = NavigationToolbar2.home
def new_home(self, *args, **kwargs):
print 'home pressed'
home(self, *args, **kwargs)
NavigationToolbar2.home = new_home
...but this doesn't:
from matplotlib.backend_bases import NavigationToolbar2
save_figure = NavigationToolbar2.save_figure
def new_save(self, *args, **kwargs):
print 'save_figure pressed'
save_figure(self, *args, **kwargs)
NavigationToolbar2.save_figure = new_save
Having actually created a figure, I can get a bound method for save_figure:
get_current_fig_manager().toolbar.save_figure()
This I can override, and call my override function successfully from my
script - but pressing the save button on the toolbar doesn't call my
function...
I'm running matplotlib 1.1.1rc and python 2.7.3
Thanks,
Will
On Wed, Apr 10, 2013 at 11:55 AM, Willw <wil...@gm...> wrote:
> I'm trying to override the behaviour of the toolbar, with partial success.
>
> This works:
>
>
>
> ...but this doesn't:
>
>
>
> Having actually created a figure, I can get a bound method for save_figure:
>
>
>
> This I can override, and call my override function successfully from my
> script - but pressing the save button on the toolbar doesn't call my
> function...
>
> I'm running matplotlib 1.1.1rc and python 2.7.3
>
> Thanks,
>
> Will
>
>
>
>
> --
> View this message in context:
> http://matplotlib.1069221.n5.nabble.com/Overriding-Save-button-on-Toolbar-tp40864.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Willw <wil...@gm...> - 2013-04-10 01:55:12
|
I'm trying to override the behaviour of the toolbar, with partial success. This works: ...but this doesn't: Having actually created a figure, I can get a bound method for save_figure: This I can override, and call my override function successfully from my script - but pressing the save button on the toolbar doesn't call my function... I'm running matplotlib 1.1.1rc and python 2.7.3 Thanks, Will -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Overriding-Save-button-on-Toolbar-tp40864.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Steven B. <bo...@ph...> - 2013-04-09 03:33:57
|
Thanks Zach, That simple little example makes more sense than the manual page did. Perhaps it's just late. I appreciate it. Steven On Mon Apr 8 22:30:43 2013, Zachary Pincus wrote: >> I've got some verts I stole from the internet that draws an upward arrow >> (or a down arrow), but I need to draw an arrow to the right or to the >> left. But I don't really understand verts and how they work. >> >> arrowup_verts = [[0.,0.], [-1., -1], [0.,0.], [0.,-2.],[0.,0.], [1,-1]] >> arrowdown_verts = [[0.,0.], [-1., 1], [0.,0.], [0.,2.],[0.,0.], [1, 1]] >> >> plot them like... >> >> scatter(1,1,s=100, marker=None, verts=arrowup_verts) >> >> >> Can someone make me new verts for the right and left arrow? Then, maybe >> tomorrow, explain how I was supposed to know what to do. > > Draw a line from (0,0) to (-1, -1) on the X-Y plane, and then to (0,0) again, and then continue so forth for all the (x,y) pairs in arrowup_verts. You will notice they form a nice little arrow pointing up. (At some point in this process, you should note that "verts" is short for "vertices". As in vertices of a polygon or poly-line.) > > It would seem that the origin of the "verts" coordinate system is translated to the (x,y) data position at which each marker is plotted. > > This should give you, I presume, sufficient information to figure out your own left and right arrows, no? Or any other shape you should care to plot... > > Zach > > >> Thanks y'all >> >> Steven >> >> -- >> >> Steven Boada >> >> Doctoral Student >> Dept of Physics and Astronomy >> Texas A&M University >> bo...@ph... >> >> >> ------------------------------------------------------------------------------ >> Precog is a next-generation analytics platform capable of advanced >> analytics on semi-structured data. The platform includes APIs for building >> apps and a phenomenal toolset for data science. Developers can use >> our toolset for easy data analysis & visualization. Get a free account! >> http://www2.precog.com/precogplatform/slashdotnewsletter >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Steven Boada Doctoral Student Dept of Physics and Astronomy Texas A&M University bo...@ph... |
|
From: Steven B. <bo...@ph...> - 2013-04-09 00:45:51
|
Hey List, I've got some verts I stole from the internet that draws an upward arrow (or a down arrow), but I need to draw an arrow to the right or to the left. But I don't really understand verts and how they work. arrowup_verts = [[0.,0.], [-1., -1], [0.,0.], [0.,-2.],[0.,0.], [1,-1]] arrowdown_verts = [[0.,0.], [-1., 1], [0.,0.], [0.,2.],[0.,0.], [1, 1]] plot them like... scatter(1,1,s=100, marker=None, verts=arrowup_verts) Can someone make me new verts for the right and left arrow? Then, maybe tomorrow, explain how I was supposed to know what to do. Thanks y'all Steven -- Steven Boada Doctoral Student Dept of Physics and Astronomy Texas A&M University bo...@ph... |
|
From: Francesco M. <fra...@gm...> - 2013-04-08 21:00:58
|
Il giorno 08/apr/2013 21:05, "Kevin Hunter Kesling" <kmh...@nc...> ha scritto: > > At 4:20pm -0400 Sun, 07 Apr 2013, Francesco Montesano wrote: >> >> Il giorno 07/apr/2013 21:03, Kevin Hunter Kesling ha scritto: >> >>> On the other hand, I'm still such a noob at Matplotlib ... is there >>> a way to have one of the subplots take up more than its default 50% >>> allotment? >> >> >> you can give a look at the last two plots in this example >> http://matplotlib.org/examples/pylab_examples/demo_tight_layout.html or use >> plot.axes providing the rectangle that you want > > > That is closer to what I want, but still not there. I was finally able to find something that fit the bill to 95% of what I want: > > http://matplotlib.1069221.n5.nabble.com/Proposal-for-Broken-Axes-td38050.html > > The first post by 'klukas' does exactly what I asked for. It's a zig-zag on the Y-axis to show that what is graphed is not continuous, and unlike the various "official" examples, the zig-zag placement is user-specifiable, as opposed to exactly halfway between the top and bottom. > > The only thing I have yet to figure out how to do is to simultaneously have a zig-zag on the X axis as well -- an artifact of how these zig-zags must be created via multiple axes on the same figure, rather than as built in to the axis artist. > > For googleability: > > The above linked graph code enables for matplotlib: > > - suppressed zeros on the Y-axis of an XY plot > - showing suppressed data on the Y-axis > - lightning bolt symbol on the Y-axis > - zig-zag on the Y-axis > - a "broken" Y-axis > > Thanks for your pointers, Francesco, as they helped me to fine-tune my Google search terms. And thank you, Klukas, whoever you are. > I'm half that you found the solution for your problem and to have been useful just providing links. This has been one of the easiest answer I have ever given :) And mostly thanks for sharing your findings. cheers and good night, Fra > Cheers, > > Kevin |