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
(12) |
2
(13) |
3
(14) |
4
(9) |
|
5
(9) |
6
(22) |
7
(17) |
8
(16) |
9
(19) |
10
(17) |
11
(6) |
|
12
|
13
(20) |
14
(21) |
15
(20) |
16
(10) |
17
(14) |
18
(3) |
|
19
(3) |
20
(12) |
21
(22) |
22
(26) |
23
(31) |
24
(26) |
25
(9) |
|
26
(4) |
27
(33) |
28
(15) |
29
(37) |
30
(26) |
|
|
|
From: Coert K. <coe...@pl...> - 2009-04-23 19:56:02
|
Hi,
I would like to maximize a window that is generated by pyplot.
Example code:
import numpy as np
import matplotlib.pyplot as plt
t = np.arange(0., 5., 0.2)
line, = plt.plot(t, t**2, 'bo')
plt.show()
I found code on how to do this in Tkinter mailing:
def maximize_toplevel( widget ):
toplevel = root.winfo_toplevel()
try:
# On MS Windows one can set the "zoomed" state.
toplevel.wm_state( 'zoomed' )
except:
w = root.winfo_screenwidth()
h = root.winfo_screenheight() - 60
geom_string = "%dx%d+0+0" % (w,h)
toplevel.wm_geometry( geom_string )
return
But I have no clue how to apply this in the pyplot environment. In
other words, how do I get from the plt.show() call to something that
can be passed to the maximize_toplevel function?
Thanks for any hint
UV
|
|
From: Elan P. <ep...@gm...> - 2009-04-23 18:32:59
|
Hi Jae-Joon,
Thanks a ton! The problem is actually not the frequency of changes.
The current method uses draw_artist on each update. However, the time
for draw_artist is linear in the *number* of points so for graphs with
a large amount of data it is extremely inefficient. Your patch means
that update time is linear in the amount of data *updated* and not in
the total amount of data.
As for the ticks you have a point. In my application I actually want
ticks to be shifted (as time goes on) so indeed this is what I want.
In general ticks that are shifted out can be redrawn using set_data
methods which are efficient since a tick can be defined as it's
endpoints. Basically when first calling plot() I set all of the tick
locators to Null and then just add ticks as a line (with two points)
based on the desired spacing. Changing a tick location (or if desired
redrawing it in the same location) is basically a call to
set_(x|y)data and then draw_artist for a line with two points (or a
line collection will *slightly* improve performance if needed).
Anyway, thanks again. I'll play around with it and let you know what I
run into.
Elan
---
I can no other answer make but thanks,
And thanks, and ever thanks.
-- William Shakespeare
On Thu, Apr 23, 2009 at 1:21 PM, Jae-Joon Lee <lee...@gm...> wrote:
> On Mon, Apr 20, 2009 at 4:34 PM, Elan Pavlov <el...@mi...> wrote:
>> Hi,
>>
>> I'm trying to use matplotlib for animating data as it is received from an
>> online source (online in the algorithmic sense not internet:). I'd like
>> the graph plot to be updated with high frequency since the data changes
>> rapidly. I've used the BufferRegion with copy_from_bbox / restore_region
>> and it speeds up the plotting considerably but alas it's still not good
>> enough (with a large number of graphs and a large number of data points in
>> each graph).
>>
>
> Well, if you need your plot updated with very high frequency, MPL may
> not be your tool of choice.
> Anyhow, my first recommendation is not to update the plot frequently.
> I mean, do you have to update the plot for every changes? Can you
> update it every 10th change, for example?
>
>> What I'd like to do is to utilize the fact that the animation is updated
>> in a predictable fashion (i.e., scrolling off the screen to the left as
>> new data arrives) in order to speed up the animation. The idea would be to
>> copy the right 99% of the graph (or some other fraction) via some kind of
>> function similar to copy_from_bbox, move it 1% to the left and then plot
>> the new 1% of the data. The problem is that as far as I can tell the
>> copy_from_bbox/restore_region does not actually allow changing the area in
>> which it is restored. I've mucked around in the source files a bit but to
>> no avail.
>>
>> My question is then:
>> 1. Is there some other way to copy everything enclosed in a Bbox? or
>> 2. Is there some way to modify the region in which data reappears when
>> using restore_region?
>> 3. Perhaps I'm missing something?
>>
>> I'm sure someone else has done this since it seems pretty natural and
>> useful for a variety of applications.
>
> I'm attaching a patch that might do what you want to do.
> It implements a "restore_bbox2" method which restores a subset of the
> saved background at a specified position.
> A small example is also attached (it is based on the gtk backend).
>
> I, personally, am not sure if this kind of feature is useful. If you
> shift part of your figure, you have to be careful not to mess up with
> the coordinate system. And also be careful about what to be shifted
> and what to be not (e.g., ticks).
>
> If others find this useful, I'll commit this to the trunk with some
> api improvement.
>
> Regards,
>
> -JJ
>
>
>>
>> Elan
>> ----
>> "If stupidity got us into this mess, why can't it get us out?"
>> - Will Rogers
>>
>> ------------------------------------------------------------------------------
>> Stay on top of everything new and different, both inside and
>> around Java (TM) technology - register by April 22, and save
>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
>> 300 plus technical and hands-on sessions. Register today.
>> Use priority code J9JMT32. http://p.sf.net/sfu/p
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
If I knew that a man was coming to my house with the conscious design
of doing me good, I should run for my life.
- Henry David Thoreau
|
|
From: Thomas R. <tho...@gm...> - 2009-04-23 18:08:59
|
It works great now - thanks for fixing this! Thomas On Apr 23, 2009, at 10:29 AM, Michael Droettboom wrote: > I think Jae-Joon's assesment is correct, since the logical dpi in PS > is hardcoded to 72.0. I have made this change in the SVN repository. > > Mike > > Thomas Robitaille wrote: >> Thanks for your quick reply! >> >> I'll be patient and wait for the fix to be made in the SVN >> repository, rather than trying to patch it myself. Do I need to >> add any information to the bug report? >> >> Best, >> >> Thomas >> >> On Apr 21, 2009, at 1:06 PM, Jae-Joon Lee wrote: >> >> >>> I can reproduce this bug with the current svn. >>> >>> It works correctly If you set dpi=72, but it seems that it would not >>> be an option in your case. >>> >>> It seems to me that this is related with the change in r6847 that >>> Michael made. >>> >>> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_ps.py?r1=6734&r2=6847 >>> >>> At line 431 of the backend_ps.py, >>> >>> clip = (0.0, 0.0, self.width * self.imagedpi, >>> self.height * self.imagedpi) >>> >>> I think we should use the dpi of the figure, instead of the imagedpi >>> of the renderer. >>> Replacing self.imagedpi with 72 (which is the dpi of the figure when >>> ps backend is used) seems to solve the problem. >>> >>> Thomas, I don't see any easy workaround for this bug other than >>> patching the code. Others may have better insight though. >>> >>> Regards, >>> >>> -JJ >>> >>> >>> >>> On Tue, Apr 21, 2009 at 9:59 AM, Thomas Robitaille >>> <tho...@gm...> wrote: >>> >>>> Hi, >>>> >>>> I've come across a bug with the savefig method when using the dpi= >>>> argument and saving an EPS file. If you try the following code, you >>>> will see that the frame is incomplete. Is there a way to solve this >>>> from a user point of view? >>>> >>>> --- >>>> >>>> import matplotlib >>>> matplotlib.use('Agg') >>>> from matplotlib.pyplot import * >>>> >>>> import numpy as np >>>> >>>> nx,ny = 10,10 >>>> >>>> image = np.random.random((nx,ny)) >>>> >>>> fig = figure(figsize=(4,4)) >>>> ax = fig.add_subplot(111) >>>> ax.imshow(image,interpolation='nearest') >>>> fig.savefig('plot.eps',dpi=30) >>>> >>>> --- >>>> >>>> I've submitted a bug report: >>>> >>>> https://sourceforge.net/tracker/?func=detail&aid=2777476&group_id=80706&atid=560720 >>>> >>>> Thanks, >>>> >>>> Thomas >>>> >>>> ------------------------------------------------------------------------------ >>>> Stay on top of everything new and different, both inside and >>>> around Java (TM) technology - register by April 22, and save >>>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >>>> 300 plus technical and hands-on sessions. Register today. >>>> Use priority code J9JMT32. http://p.sf.net/sfu/p >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >>>> >> >> >> ------------------------------------------------------------------------------ >> Stay on top of everything new and different, both inside and around >> Java (TM) technology - register by April 22, and save >> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >> 300 plus technical and hands-on sessions. Register today. Use >> priority code J9JMT32. http://p.sf.net/sfu/p >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > |
|
From: Esmail <eb...@ho...> - 2009-04-23 18:04:57
|
Hi,
I have two quick questions:
1. Is it possible to exit a Python program but still have the graph
window generated by pylot remain visible? Right now the program stops
when I display the (only) final graph. When I close this window, the
program exits. I would like to finish the program, but have the graph
stay visible if that's possible (I suppose I could save a graphics
file and then display it - but that's a bit different)
2. Is it possible to update graphs somewhat efficiently during the
runtime of the program? Say I have a loop that generates value to
be plotted. Right now I collect them and plot them at the end, ie
values = []
for i in range(0, 200):
values.append(i)
various pyplot commands to plot the values list.
I wonder if I could have the graph update during each iteration instead
giving me an up-to-date view of the data. (The above is a super simplified
example of course)
Thanks,
Esmail
|
|
From: Gökhan S. <gok...@gm...> - 2009-04-23 17:53:53
|
Works here. Don't know it's a browser issue or something related to your connection. Best to wait a reply from John Hunter. He might have it uploaded somewhere else. And yes developers knows a lot about their product then users. Wish there were more handy instructional videos -showing step-by-step what is on throughout the program. I know I am asking too much :) Gökhan On Thu, Apr 23, 2009 at 12:40 PM, Jim Vickroy <Jim...@no...> wrote: > Esmail wrote: > > Selam to you too Gökhan, > > Gökhan SEVER wrote: > > > What I recommend you is: watching John Hunter's video at Matplotlib by > John D. Hunter <http://videolectures.net/mloss08_hunter_mat/> <http://videolectures.net/mloss08_hunter_mat/>. His > introduction of matplotlib and examples he use could be very interesting > to watch for you. > > > I just started to check out the video, looks interesting and useful, > thanks for the link. > > > I have tried twice to watch this video and each time, after a lengthy > delay, a "server not found ..." message appears after I click on the "play > button". This happens in both Firefox 3 and IE7 on my MS Windows XP Pro > machine. > > Also you can take a look at this book: Beginning Python Visualization: > Crafting Visual Transformation Scripts > > > I had not heard of this book before, I'll look for more information > on it. > > > > Good luck on your plotting adventures. > > > Thanks - it's fun to learn new things. > > Cheers, > Esmail > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Matplotlib-users mailing lis...@li...://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Esmail <eb...@ho...> - 2009-04-23 17:51:35
|
Jim Vickroy wrote: > > I have tried twice to watch this video and each time, after a lengthy > delay, a "server not found ..." message appears after I click on the > "play button". This happens in both Firefox 3 and IE7 on my MS Windows > XP Pro machine. Works here with XP Prof SP2 and Firefox 3.0.9 ... odd. Esmail |
|
From: Jim V. <Jim...@no...> - 2009-04-23 17:40:32
|
Esmail wrote: > Selam to you too Gökhan, > > Gökhan SEVER wrote: > >> What I recommend you is: watching John Hunter's video at Matplotlib by >> John D. Hunter <http://videolectures.net/mloss08_hunter_mat/>. His >> introduction of matplotlib and examples he use could be very interesting >> to watch for you. >> > > I just started to check out the video, looks interesting and useful, > thanks for the link. > I have tried twice to watch this video and each time, after a lengthy delay, a "server not found ..." message appears after I click on the "play button". This happens in both Firefox 3 and IE7 on my MS Windows XP Pro machine. > >> Also you can take a look at this book: Beginning Python Visualization: >> Crafting Visual Transformation Scripts >> > > I had not heard of this book before, I'll look for more information > on it. > > >> Good luck on your plotting adventures. >> > > Thanks - it's fun to learn new things. > > Cheers, > Esmail > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Jae-Joon L. <lee...@gm...> - 2009-04-23 17:31:29
|
On Thu, Apr 23, 2009 at 3:54 AM, philscher <p.h...@ls...> wrote: > > Hello, > > I need to plot 3 functions into the same plot, each having different scales > (same x, different y values). > For the first 2 functions I can use twinx(). But how can I include a 3rd > axis, which should appear > beside the first y-axis and plot the 3rd function ? > Is this close to what you want? http://dl.getdropbox.com/u/178748/AxesGrid/htdocs/_images/demo_parasite_axes2.png If yes, you may take a look at http://dl.getdropbox.com/u/178748/AxesGrid/htdocs/users/overview.html#axisline However, it may not work correctly unless you're using the svn version of the mpl. -JJ > Thanks for matplotlib & help > > Paul > -- > View this message in context: http://www.nabble.com/3rd-y-axis-in-plot-tp23174438p23174438.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Jae-Joon L. <lee...@gm...> - 2009-04-23 17:21:26
|
On Mon, Apr 20, 2009 at 4:34 PM, Elan Pavlov <el...@mi...> wrote: > Hi, > > I'm trying to use matplotlib for animating data as it is received from an > online source (online in the algorithmic sense not internet:). I'd like > the graph plot to be updated with high frequency since the data changes > rapidly. I've used the BufferRegion with copy_from_bbox / restore_region > and it speeds up the plotting considerably but alas it's still not good > enough (with a large number of graphs and a large number of data points in > each graph). > Well, if you need your plot updated with very high frequency, MPL may not be your tool of choice. Anyhow, my first recommendation is not to update the plot frequently. I mean, do you have to update the plot for every changes? Can you update it every 10th change, for example? > What I'd like to do is to utilize the fact that the animation is updated > in a predictable fashion (i.e., scrolling off the screen to the left as > new data arrives) in order to speed up the animation. The idea would be to > copy the right 99% of the graph (or some other fraction) via some kind of > function similar to copy_from_bbox, move it 1% to the left and then plot > the new 1% of the data. The problem is that as far as I can tell the > copy_from_bbox/restore_region does not actually allow changing the area in > which it is restored. I've mucked around in the source files a bit but to > no avail. > > My question is then: > 1. Is there some other way to copy everything enclosed in a Bbox? or > 2. Is there some way to modify the region in which data reappears when > using restore_region? > 3. Perhaps I'm missing something? > > I'm sure someone else has done this since it seems pretty natural and > useful for a variety of applications. I'm attaching a patch that might do what you want to do. It implements a "restore_bbox2" method which restores a subset of the saved background at a specified position. A small example is also attached (it is based on the gtk backend). I, personally, am not sure if this kind of feature is useful. If you shift part of your figure, you have to be careful not to mess up with the coordinate system. And also be careful about what to be shifted and what to be not (e.g., ticks). If others find this useful, I'll commit this to the trunk with some api improvement. Regards, -JJ > > Elan > ---- > "If stupidity got us into this mess, why can't it get us out?" > - Will Rogers > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Esmail <eb...@ho...> - 2009-04-23 17:15:14
|
> There is no quick reference, though one would be handy. If you scroll > down to the bottom of the main page at > > http://matplotlib.sourceforge.net/index.html > > there is a summary of the pyplot plotting commands with links to the > full docs. You can at least see most everything that is available in > pyplot in one place. > > JDH ah .. nice, thanks! Esmail |
|
From: Esmail <eb...@ho...> - 2009-04-23 17:10:18
|
Selam to you too Gökhan, Gökhan SEVER wrote: > > What I recommend you is: watching John Hunter's video at Matplotlib by > John D. Hunter <http://videolectures.net/mloss08_hunter_mat/>. His > introduction of matplotlib and examples he use could be very interesting > to watch for you. I just started to check out the video, looks interesting and useful, thanks for the link. > Also you can take a look at this book: Beginning Python Visualization: > Crafting Visual Transformation Scripts I had not heard of this book before, I'll look for more information on it. > Good luck on your plotting adventures. Thanks - it's fun to learn new things. Cheers, Esmail |
|
From: Jae-Joon L. <lee...@gm...> - 2009-04-23 16:21:18
|
On Mon, Apr 20, 2009 at 4:09 PM, fjldurodie <fre...@go...> wrote: > Hi, > > I'm wondering if it is possible to use SpanSelector on multiple figures > : my problem is that I can't think of a way to tell the onselect on > which axes(ses) of which figure it should try and do something. The > example works because there is only one SpanSelector active and "it" > therefore knows which axes "it" should redraw. > > For it to work on multiple figures (say I have a series of events that I > plot in a similar way each in a separate figure and I would like a > SpanSelector feature on each of the figures) I would need to have a > reference to which axes called the onselect through SpanSelector : then > I could get the axes's figure and manipulate the other subplots on that > figure accordingly. Mouse event in mpl has a "inaxes" property. However, SpanSelector hide event information from users. On the other hand, the first argument of the SpanSelector is the "axes" that you want to use. So, I'm not sure what your point is. You already know the axes you're working with. Can't you just use different callbacks for different axes? -JJ > > Is there a way of doing this ? > > Kind regards, > Frederic > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Ryan M. <rm...@gm...> - 2009-04-23 15:22:19
|
On Thu, Apr 23, 2009 at 8:40 AM, Till Backhaus <ti...@ba...> wrote:
> Hi there,
>
> I'm using matplotlib (version 0.98.5.2) to generate a couple of bar-
> charts for a website.
> Until now I've not been able to find a way set the x axis to a fixed
> range.
>
> Suppose my data is turnover per hour. Now: If there is zero turnover
> at the beginning
> or the end of a period matplotlib omits that value and limits the
> xrange so that non-zero
> hours reside on the edges which would be confusing for the users.
>
> This is the code:
> import matplotlib
> matplotlib.use('Agg')
> import matplotlib.pyplot as plt
> fig = plt.figure(figsize=(5,4),dpi=72)
> ax = fig.add_subplot(111)
> ax.set_ylabel('EUR')
> ax.set_xlabel('Hour')
> ax.set_xlim((1,24))
> ax.bar(data.keys(),data.values(),width=1,align='center')
> fig.savefig(filename)
>
Try moving the call to ax.set_xlim to *after* the call to ax.bar.
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
|
|
From: Michael D. <md...@st...> - 2009-04-23 14:29:26
|
I think Jae-Joon's assesment is correct, since the logical dpi in PS is hardcoded to 72.0. I have made this change in the SVN repository. Mike Thomas Robitaille wrote: > Thanks for your quick reply! > > I'll be patient and wait for the fix to be made in the SVN repository, > rather than trying to patch it myself. Do I need to add any > information to the bug report? > > Best, > > Thomas > > On Apr 21, 2009, at 1:06 PM, Jae-Joon Lee wrote: > > >> I can reproduce this bug with the current svn. >> >> It works correctly If you set dpi=72, but it seems that it would not >> be an option in your case. >> >> It seems to me that this is related with the change in r6847 that >> Michael made. >> >> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/backends/backend_ps.py?r1=6734&r2=6847 >> >> At line 431 of the backend_ps.py, >> >> clip = (0.0, 0.0, self.width * self.imagedpi, >> self.height * self.imagedpi) >> >> I think we should use the dpi of the figure, instead of the imagedpi >> of the renderer. >> Replacing self.imagedpi with 72 (which is the dpi of the figure when >> ps backend is used) seems to solve the problem. >> >> Thomas, I don't see any easy workaround for this bug other than >> patching the code. Others may have better insight though. >> >> Regards, >> >> -JJ >> >> >> >> On Tue, Apr 21, 2009 at 9:59 AM, Thomas Robitaille >> <tho...@gm...> wrote: >> >>> Hi, >>> >>> I've come across a bug with the savefig method when using the dpi= >>> argument and saving an EPS file. If you try the following code, you >>> will see that the frame is incomplete. Is there a way to solve this >>> from a user point of view? >>> >>> --- >>> >>> import matplotlib >>> matplotlib.use('Agg') >>> from matplotlib.pyplot import * >>> >>> import numpy as np >>> >>> nx,ny = 10,10 >>> >>> image = np.random.random((nx,ny)) >>> >>> fig = figure(figsize=(4,4)) >>> ax = fig.add_subplot(111) >>> ax.imshow(image,interpolation='nearest') >>> fig.savefig('plot.eps',dpi=30) >>> >>> --- >>> >>> I've submitted a bug report: >>> >>> https://sourceforge.net/tracker/?func=detail&aid=2777476&group_id=80706&atid=560720 >>> >>> Thanks, >>> >>> Thomas >>> >>> ------------------------------------------------------------------------------ >>> Stay on top of everything new and different, both inside and >>> around Java (TM) technology - register by April 22, and save >>> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. >>> 300 plus technical and hands-on sessions. Register today. >>> Use priority code J9JMT32. http://p.sf.net/sfu/p >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >>> > > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Jouni K. S. <jk...@ik...> - 2009-04-23 14:11:46
|
David Kiliani <ma...@da...> writes: > http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=rev&revision=4933 > which does not make any sense to me. Why was the kwargs readout > disabled, even if the default setting was already 72dpi? Before that change, the dpi setting changed the size of the pages produced by the pdf backend, not the resolution. But since revision 6645 (release version 0.98.5.2) the dpi argument should set the resolution of images again. (I think this used to work before the Great Transform Refactoring, so in versions on the 0.91 branch it should work, too.) -- Jouni K. Seppänen http://www.iki.fi/jks |
|
From: Till B. <ti...@ba...> - 2009-04-23 14:08:49
|
Hi there,
I'm using matplotlib (version 0.98.5.2) to generate a couple of bar-
charts for a website.
Until now I've not been able to find a way set the x axis to a fixed
range.
Suppose my data is turnover per hour. Now: If there is zero turnover
at the beginning
or the end of a period matplotlib omits that value and limits the
xrange so that non-zero
hours reside on the edges which would be confusing for the users.
This is the code:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
fig = plt.figure(figsize=(5,4),dpi=72)
ax = fig.add_subplot(111)
ax.set_ylabel('EUR')
ax.set_xlabel('Hour')
ax.set_xlim((1,24))
ax.bar(data.keys(),data.values(),width=1,align='center')
fig.savefig(filename)
I searched the docs but I didn't find anything that could fix my
problem.
It would be great if anybody knew (and told me) what I am doing wrong.
Thanks in advance
Till Backhaus
|
|
From: Jouni K. S. <jk...@ik...> - 2009-04-23 14:08:24
|
joh...@wo... writes:
> I recently changed some of the colours, using tuples of RGB values instead
> of the standard colors and now the scripts will run from the command line,
> but not as scheduled cron jobs and I get the following error:
>
> Unable to access the X Display, is $DISPLAY set properly?
This has probably nothing to do with the way you specify colors. For
some reason matplotlib is using an interactive backend. Make sure that
your script starts with
import matplotlib
matplotlib.use('Agg')
or that you specify the Agg backend in your matplotlibrc file.
--
Jouni K. Seppänen
http://www.iki.fi/jks
|
|
From: Michael D. <md...@st...> - 2009-04-23 13:55:32
|
You can call "set_clip_box(None)" on all of the artists you draw. (The circles and other patches etc.) Cheers, Mike Carlos Guâno Grohmann wrote: > Dears, > > In this app I'm working on, I have a circular plot (not a polar plot, > just a plot inside a circular area) in a panel, within a > wx.splitterwindow. > The problem is that the edges of the plot are being clipped (see > screenshots). How to prevent this from happening? I tried different > combination of aces.set_xlim() and axes.set_xbound(), but without > success (I also don't the difference between xlim and xbound). > > screenshots , code and sample data attached. > > many thanks > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: Michael D. <md...@st...> - 2009-04-23 13:47:38
|
This is usually caused by having an interactive backend (such as Gtk,
Qt, Tk) which would require X11. Try setting your backend to "Agg".
import matplotlib
matplotlib.use("Agg")
Cheers,
Mike
joh...@wo... wrote:
> I have been successfully producing graphics as pngs with matplotlib and
> running them as cron jobs with Linux for some time. These graphics used
> "standard" colors.
>
> I recently changed some of the colours, using tuples of RGB values instead
> of the standard colors and now the scripts will run from the command line,
> but not as scheduled cron jobs and I get the following error:
>
> Unable to access the X Display, is $DISPLAY set properly?
>
> The script then terminates.
>
> Can anyone help me with how to set the display in cron and run Matplotlib
> as a cron job.
>
> Thanks
> John
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
|
|
From: Michael D. <md...@st...> - 2009-04-23 13:47:28
|
Can you provide more information, such as any messages emitted when you import pylab? John Seales wrote: > > > ------------------------------------------------------------------------ > From: pra...@ho... > To: mat...@li... > Date: Tue, 21 Apr 2009 16:14:37 -0700 > Subject: [Matplotlib-users] help installing matplotlib > > I have an intel mac running os 10.4.11. I use python 2.6 > > When I install matplotlib it seems to work, but then there is a bug > about pylab. There is a font that doesn't work. > > Can anybody out there help me? > > > > ------------------------------------------------------------------------ > Windows Live™ Hotmail®:…more than just e-mail. Check it out. > <http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_more_042009> > ------------------------------------------------------------------------ > Rediscover Hotmail®: Get e-mail storage that grows with you. Check it > out. > <http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009> > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
|
From: olslewfoot <joh...@wo...> - 2009-04-23 11:07:46
|
I have been successfully producing graphics as pngs with matplotlib and running them as cron jobs with Linux for some time. These graphics used "standard" colors. I recently changed some of the colours, using tuples of RGB values instead of the standard colors and now the scripts will run from the command line, but not as scheduled cron jobs and I get the following error: Unable to access the X Display, is $DISPLAY set properly? The script then terminates. Can anyone help me with how to set the display in cron and run Matplotlib as a cron job. Thanks John -- View this message in context: http://www.nabble.com/Matplotlib-running-under-cron-tp23194748p23194748.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: <joh...@wo...> - 2009-04-23 10:33:18
|
I have been successfully producing graphics as pngs with matplotlib and running them as cron jobs with Linux for some time. These graphics used "standard" colors. I recently changed some of the colours, using tuples of RGB values instead of the standard colors and now the scripts will run from the command line, but not as scheduled cron jobs and I get the following error: Unable to access the X Display, is $DISPLAY set properly? The script then terminates. Can anyone help me with how to set the display in cron and run Matplotlib as a cron job. Thanks John |
|
From: philscher <p.h...@ls...> - 2009-04-23 07:54:51
|
Hello, I need to plot 3 functions into the same plot, each having different scales (same x, different y values). For the first 2 functions I can use twinx(). But how can I include a 3rd axis, which should appear beside the first y-axis and plot the 3rd function ? Thanks for matplotlib & help Paul -- View this message in context: http://www.nabble.com/3rd-y-axis-in-plot-tp23174438p23174438.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Jouni K. S. <jk...@ik...> - 2009-04-23 05:57:38
|
John Seales <pra...@ho...> writes: > Anyone have any help to get pylab working? Should I reinstall? What > method should I use? I guess you missed my previous reply asking for more details (I changed the subject so that people who know more about OS X might notice it): http://thread.gmane.org/gmane.comp.python.numeric.general/29635/focus=17135 -- Jouni K. Seppänen http://www.iki.fi/jks |
|
From: Carlos G. G. <car...@gm...> - 2009-04-23 04:25:48
|
Dears, In this app I'm working on, I have a circular plot (not a polar plot, just a plot inside a circular area) in a panel, within a wx.splitterwindow. The problem is that the edges of the plot are being clipped (see screenshots). How to prevent this from happening? I tried different combination of aces.set_xlim() and axes.set_xbound(), but without success (I also don't the difference between xlim and xbound). screenshots , code and sample data attached. many thanks -- Carlos Henrique Grohmann - Geologist D.Sc. a.k.a. Guano - Linux User #89721 ResearcherID: A-9030-2008 carlos dot grohmann at gmail dot com http://www.igc.usp.br/pessoais/guano/ _________________ "Good morning, doctors. I have taken the liberty of removing Windows 95 from my hard drive." --The winning entry in a "What were HAL's first words" contest judged by 2001: A SPACE ODYSSEY creator Arthur C. Clarke Can’t stop the signal. |