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
(5) |
2
(24) |
3
(2) |
|
4
|
5
(4) |
6
(1) |
7
(22) |
8
(9) |
9
(23) |
10
(6) |
|
11
|
12
(7) |
13
(17) |
14
(12) |
15
(10) |
16
(22) |
17
(11) |
|
18
(6) |
19
(11) |
20
(13) |
21
(10) |
22
(7) |
23
(7) |
24
(5) |
|
25
(3) |
26
(20) |
27
(17) |
28
(25) |
29
(16) |
30
(17) |
31
(8) |
|
From: belinda t. <bt...@cs...> - 2007-03-23 22:44:40
|
Hi,
I'm trying to write a very simple GUI using matplotlib and have
gotten stuck. Hopefully someone out there has done something similar
and can point me on my way.
First, I should mention that the examples provided with matplotlib
weren't immediately helpful to me, because when I try to run various
demos (like pick_event_demo or object_picker) it fails b/c I'm
relying on (and have to rely on) TkAgg. Sadly, I'm too new to
understand what I would need to do to get those demos working. So I
found someone processing mouseclicks using a Mac online and started
there.
I ended up with something like this:
from pylab import *
class gui :
def __init__(self) :
self.f = figure()
self.data = None # valid mouse click hasn't yet happened
def clicker(event):
self.data = event.xdata
self.f.canvas.mpl_connect("button_press_event",clicker)
def getNextValidClick(self) :
(data, self.data) = (None, None)
while True :
print "Waiting for valid mouse click..."
while self.data == None :
pass # keep polling
if 1 <= self.data <= 3 :
# consider this a valid next mouse click
(data, self.data) = (self.data, None)
break
return data
With which I tried:
g = gui()
x = g.getNextValidClick()
but the latter line caused me to experience the spinning wheel of
dead that we mac users so enjoy.
I have the feeling I need to explicitly yield or some such in the
poll loop, but I don't know how to do that.
Advice greatly appreciated, both on the code I've provided, and on if
there is a better way altogether to provide an app with data obtained
via a matplotlib mouse click callback.
Thanks,
--b
|
|
From: belinda t. <bt...@cs...> - 2007-03-23 22:30:27
|
Eric, This is great; much thanks! --b On Mar 23, 2007, at 3:16 PM, Eric Firing wrote: > belinda thom wrote: >> Hi, >> I'm wondering if there's an easy way to reverse an axis in a plot. > > Using methods: > > bottom, top = ax.get_ylim() > ax.set_ylim(top, bottom) > > Or using pylab functions: > > bottom, top = ylim() > ylim(top, bottom) > > Eric > >> For instance, suppose I wanted to create a plot that had its >> "origin" in the upper left hand corner, so that x would range >> from, say 0 to 1 moving right, and y would range from, say 0 to >> 1, moving down. >> Thanks! >> --b >> --------------------------------------------------------------------- >> ---- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to >> share your >> opinions on IT & business topics through brief surveys-and earn cash >> http://www.techsay.com/default.php? >> page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Eric F. <ef...@ha...> - 2007-03-23 22:17:15
|
belinda thom wrote: > Hi, > > I'm wondering if there's an easy way to reverse an axis in a plot. Using methods: bottom, top = ax.get_ylim() ax.set_ylim(top, bottom) Or using pylab functions: bottom, top = ylim() ylim(top, bottom) Eric > > For instance, suppose I wanted to create a plot that had its "origin" > in the upper left hand corner, so that x would range from, say 0 to 1 > moving right, and y would range from, say 0 to 1, moving down. > > Thanks! > > --b > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: belinda t. <bt...@cs...> - 2007-03-23 21:48:38
|
Hi, I'm wondering if there's an easy way to reverse an axis in a plot. For instance, suppose I wanted to create a plot that had its "origin" in the upper left hand corner, so that x would range from, say 0 to 1 moving right, and y would range from, say 0 to 1, moving down. Thanks! --b |
|
From: Eric F. <ef...@ha...> - 2007-03-23 08:23:48
|
Richard, I have made the requested change to imshow, so it is consistent with the new matshow, and I think it makes much more sense this way--but note that it depends on your rc value for image.origin. So, whenever you get mpl from svn, or the next release (whenever that occurs--not very soon, I suspect), I think you will find both matshow and imshow more to your liking. I also changed the docstring explanation for the extent kwarg, noting that it gives (left, right, bottom, top) data limits of the axes. More doc changes and other tweaks for this class of functions will be in order, when I get back to it. Eric Richard Brown wrote: > On 22/03/07, Eric Firing <ef...@ha...> wrote: >> Richard Brown wrote: >> > Hi there, >> > >> > I'm pretty new to python; I'm in the process of switching from Matlab. >> > I do quite a bit of image processing in my research, and while >> > pylab/matplotlib seems to be a great plotting library, some of the >> > quirks seem just a little bit frustrating - I'm hoping for some >> > enlightenment :) >> > >> > When I use imshow or matshow to display an array, the points with >> > index (m, n) are displayed with the pixels centred at (0.5 + m, 0.5 + >> > n). Is there a setting somewhere to make it so that the centres of the >> > pixels are at the index values rather than their bottom left corners? >> > Or must I be always adding 0.5 to things to make them appear in the >> > right places? >> >> Coincidentally, a few days ago I made this change for matshow; I had >> made it in spy some time ago. I have so far left imshow alone; isn't >> its present behavior consistent with Matlab? That is not necessarily a >> good reason for leaving it the way it is, but it is reason for some >> caution. I suspect quite a few people may prefer it the way it is; >> let's see who responds, and what opinions are voiced. > > Thanks for your timely response. Let me give you a few examples to > clarify the things which I think might be relevant issues to address. > (numpy and pylab imported) > > PRELIMINARIES > # Create a 6x6 logical array with a 2x2 square near the to left > xx = zeros((6, 6), dtype='Bool') > xx[1:3, 1:3] = True > > > EXAMPLE 1 - imshow > Trying to plot a point which should appear on the square: >>>> imshow(xx, interpolation='nearest') >>>> plot([2],[2], 'y.', markersize=20) > > The image looks correct, with the square in the top left, but the y > axis is labelled backwards. Therefore when I try to plot a point in > the middle of it, it misses altogether > > EXAMPLE 2 - matshow (not your new version) >>>> matshow(xx) > So far so good - the y axis is the right way around >>>> plot([2],[2], 'y.', markersize=20) > Oops - the y axis flipped, there is a block of white at the top, and > the image is now upside-down. The point has showed up in the right > place w.r.t the image though. > > EXAMPLE 3 - off by 0.5 problem - relevant to imshow too >>>> matshow(xx) > Let's say I want to compute the centroid of the square blob. IMO a > natural way to do this is: >>>> cen = mean(where(xx), 1) >>>> plot([cen[0]], [cen[1]], 'y.') > > This is off by 0.5 in both directions. This kind of thing is my > argument for why the coordinate system should be aligned with the > array indices. > > Matlab behaviour: > In Matlab, the pixels are centred on integer coordinates corresponding > to their array index. Matlab indexing is ones based, so a 2x2 image > will have axes limits of 0.5-2.5 in each direction, with the pixel > centres at (1,1), (1,2) etc. > imshow in Matlab plots the array with the (1,1) coordinate in the top > left, and the y axis increasing from the top down (like what matshow > does here) > > cheers, > > Richard |
|
From: Stephen G. <ste...@op...> - 2007-03-23 01:50:59
|
Creating a 'simplified' example (not really) to demonstrate the problem Zoom in on one of the constant speed movements.(upper graph) psd (lower graph) will still be showing spectrum of whole data file. click 'n release any mouse button in the upper graph, and only then will the lower graph redraw with the new limits. zoom out, try again on other constant speed movement. how to get lower graph to redraw on new limits after the zoom, without having to click the upper graph again? Steve > I have two plots. > > first one is velocity data from servo controller (freq) - plant > reciprocates back and forth so we got turn data in there as well > second one is psd (power spectral density) so we can see where we got > resonances etc. > > When we zoom in on on section of first plot (say the forward movement), > I'd like to recalc the psd with only the data that's been zoomed in on. > > Everything kind of works except for somewhere to trigger from. > > I had thought of trying resize_event - however I cannot get this > working- see other post. > > I played with button_release_event to get the code basically working, > however that event occurs before the first graph gets resized, so the > region I am calculating the psd on is wrong, maybe because I am using > xlim = myAxis.get_xlim() > to find the limits of the first graph (which hasn't been re-drawn yet) > > Is there some way I can hook the re-calc/draw of psd to the zooming of > first graph? > > Previously with 2 plot commands, I have used subplot(212, sharex=p1), to > hook the two graphs together on the xaxis > however as the second graph is a psd I don't know how to hook the psd > input data to the xaxis of the first graph. > > > Thanks > Ste > |
|
From: Richard B. <rg...@gm...> - 2007-03-23 00:18:29
|
On 22/03/07, Eric Firing <ef...@ha...> wrote: > Richard Brown wrote: > > Hi there, > > > > I'm pretty new to python; I'm in the process of switching from Matlab. > > I do quite a bit of image processing in my research, and while > > pylab/matplotlib seems to be a great plotting library, some of the > > quirks seem just a little bit frustrating - I'm hoping for some > > enlightenment :) > > > > When I use imshow or matshow to display an array, the points with > > index (m, n) are displayed with the pixels centred at (0.5 + m, 0.5 + > > n). Is there a setting somewhere to make it so that the centres of the > > pixels are at the index values rather than their bottom left corners? > > Or must I be always adding 0.5 to things to make them appear in the > > right places? > > Coincidentally, a few days ago I made this change for matshow; I had > made it in spy some time ago. I have so far left imshow alone; isn't > its present behavior consistent with Matlab? That is not necessarily a > good reason for leaving it the way it is, but it is reason for some > caution. I suspect quite a few people may prefer it the way it is; > let's see who responds, and what opinions are voiced. Thanks for your timely response. Let me give you a few examples to clarify the things which I think might be relevant issues to address. (numpy and pylab imported) PRELIMINARIES # Create a 6x6 logical array with a 2x2 square near the to left xx = zeros((6, 6), dtype='Bool') xx[1:3, 1:3] = True EXAMPLE 1 - imshow Trying to plot a point which should appear on the square: >>> imshow(xx, interpolation='nearest') >>> plot([2],[2], 'y.', markersize=20) The image looks correct, with the square in the top left, but the y axis is labelled backwards. Therefore when I try to plot a point in the middle of it, it misses altogether EXAMPLE 2 - matshow (not your new version) >>> matshow(xx) So far so good - the y axis is the right way around >>> plot([2],[2], 'y.', markersize=20) Oops - the y axis flipped, there is a block of white at the top, and the image is now upside-down. The point has showed up in the right place w.r.t the image though. EXAMPLE 3 - off by 0.5 problem - relevant to imshow too >>> matshow(xx) Let's say I want to compute the centroid of the square blob. IMO a natural way to do this is: >>> cen = mean(where(xx), 1) >>> plot([cen[0]], [cen[1]], 'y.') This is off by 0.5 in both directions. This kind of thing is my argument for why the coordinate system should be aligned with the array indices. Matlab behaviour: In Matlab, the pixels are centred on integer coordinates corresponding to their array index. Matlab indexing is ones based, so a 2x2 image will have axes limits of 0.5-2.5 in each direction, with the pixel centres at (1,1), (1,2) etc. imshow in Matlab plots the array with the (1,1) coordinate in the top left, and the y axis increasing from the top down (like what matshow does here) cheers, Richard |