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
(2) |
2
(1) |
|
3
|
4
(1) |
5
(1) |
6
(5) |
7
(8) |
8
(4) |
9
|
|
10
(1) |
11
(1) |
12
(2) |
13
(7) |
14
(3) |
15
(4) |
16
(4) |
|
17
(3) |
18
(4) |
19
(5) |
20
(2) |
21
(13) |
22
(6) |
23
(5) |
|
24
(5) |
25
(1) |
26
(14) |
27
(2) |
28
(5) |
29
(3) |
30
(3) |
|
31
(4) |
|
|
|
|
|
|
|
From: Eric F. <ef...@ha...> - 2015-05-26 19:55:23
|
On 2015/05/26 9:10 AM, Benjamin Root wrote:
> I think this is a feature/bug that got reverted in the master branch.
> Perhaps you could try building matplotlib from source and seeing if the
> problem goes away?
Ben, it looks familiar, and related to a bizarre feature that I thought
we had eliminated--but I just tried it with master, and it's still
there. Maybe the change is still languishing in an open PR.
Sean,
I think you are understandably misunderstanding the confusing annotation
API.
ax.annotate( r"$\mathbf{" + label + ")}$",
xy=(0.9, 0.9),
xycoords="axes fraction",
fontsize=14 )
If you change your annotation call to the simpler version above, I think
it will do what you intended.
Eric
>
> Cheers!
> Ben Root
>
> On Tue, May 26, 2015 at 3:00 PM, Sean Lake <ody...@gm...
> <mailto:ody...@gm...>> wrote:
>
> Sterling,
>
> Thanks for the pointer. I've already used a workaround where I used
> "data" coordinates and put it at:
> 0.9 * (xmax - xmin) + xmin, and similar for y.
>
> I'm really only reporting this so that it can be fixed if there is
> someone who does need to annotate something in a grid.
>
> Sean
>
> > On May 26, 2015, at 11:54, Sterling Smith <sm...@fu...
> <mailto:sm...@fu...>> wrote:
> >
> > Sean,
> >
> > Do you need an `annotate`, or just a `text`? `text` has the
> `transform` keyword, to which you can pass `ax.transAxes`.
> >
> > ax.text(.9,.9, r"$\mathbf{" + lab +
> ")}$”,transform=ax.transAxes,ha=‘right’,va=‘center’)
> >
> > -Sterling
> >
> > On May 26, 2015, at 10:06AM, Sean Lake <ody...@gm...
> <mailto:ody...@gm...>> wrote:
> >
> >> Hello all,
> >>
> >> I'm using matplotlib 1.4.3 installed using fink with python 2.7.
> >>
> >> I'm trying to produce a grid of plots using gridspec that has
> annotations to label each plot.
> >>
> >> Here is the call to annotate the current axes:
> >> ax.annotate( r"$\mathbf{" + lab + ")}$",
> >> xy=(0.5*(xmin+xmax), 0.5*(ymin+ymax)),
> >> xytext=(0.9, 0.9),
> >> textcoords="axes fraction", fontsize=14 )
> >>
> >> Where ax is initialized by:
> >> ax = plt.subplot(gs[ coords[0], coords[1] ])
> >>
> >> and gs by:
> >> gs = mpgs.GridSpec( 3, 2, wspace=0.0, hspace=0.0 )
> >>
> >> The trouble comes in when abs(ymax) < abs(ymin). When that is
> true, the labels are offset upward by one row, for some reason.
> >>
> >> I've attached a script that demonstrates the problem, and an
> example of the output. I can work around this problem by using
> "data" coordinates, but even so this reveals a bug somewhere.
> >>
> >> Thanks,
> >> Sean Lake
> >>
> >>
> <BugDemo.py><BugDemo.pdf>------------------------------------------------------------------------------
> >> One dashboard for servers and applications across
> Physical-Virtual-Cloud
> >> Widest out-of-the-box monitoring support with 50+ applications
> >> Performance metrics, stats and reports that give you Actionable
> Insights
> >> Deep dive visibility with transaction tracing using APM Insight.
> >>
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> >> Matplotlib-users mailing list
> >> Mat...@li...
> <mailto:Mat...@li...>
> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> <mailto:Mat...@li...>
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Sterling S. <sm...@fu...> - 2015-05-26 19:32:28
|
Sean,
Do you need an `annotate`, or just a `text`? `text` has the `transform` keyword, to which you can pass `ax.transAxes`.
ax.text(.9,.9, r"$\mathbf{" + lab + ")}$”,transform=ax.transAxes,ha=‘right’,va=‘center’)
-Sterling
On May 26, 2015, at 10:06AM, Sean Lake <ody...@gm...> wrote:
> Hello all,
>
> I'm using matplotlib 1.4.3 installed using fink with python 2.7.
>
> I'm trying to produce a grid of plots using gridspec that has annotations to label each plot.
>
> Here is the call to annotate the current axes:
> ax.annotate( r"$\mathbf{" + lab + ")}$",
> xy=(0.5*(xmin+xmax), 0.5*(ymin+ymax)),
> xytext=(0.9, 0.9),
> textcoords="axes fraction", fontsize=14 )
>
> Where ax is initialized by:
> ax = plt.subplot(gs[ coords[0], coords[1] ])
>
> and gs by:
> gs = mpgs.GridSpec( 3, 2, wspace=0.0, hspace=0.0 )
>
> The trouble comes in when abs(ymax) < abs(ymin). When that is true, the labels are offset upward by one row, for some reason.
>
> I've attached a script that demonstrates the problem, and an example of the output. I can work around this problem by using "data" coordinates, but even so this reveals a bug somewhere.
>
> Thanks,
> Sean Lake
>
> <BugDemo.py><BugDemo.pdf>------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Neal B. <ndb...@gm...> - 2015-05-26 19:25:15
|
I'm plotting 1 figure with 8 subplots. They are 8 channels, and I want to see if there is some interaction. I wish that the 'configure subplots' menu allowed me to choose just some subplots to display (resizing when I turn some off), so I could get a better view at the selected subplots. -- Those who fail to understand recursion are doomed to repeat it |
|
From: Benjamin R. <ben...@ou...> - 2015-05-26 19:10:36
|
I think this is a feature/bug that got reverted in the master branch.
Perhaps you could try building matplotlib from source and seeing if the
problem goes away?
Cheers!
Ben Root
On Tue, May 26, 2015 at 3:00 PM, Sean Lake <ody...@gm...> wrote:
> Sterling,
>
> Thanks for the pointer. I've already used a workaround where I used "data"
> coordinates and put it at:
> 0.9 * (xmax - xmin) + xmin, and similar for y.
>
> I'm really only reporting this so that it can be fixed if there is someone
> who does need to annotate something in a grid.
>
> Sean
>
> > On May 26, 2015, at 11:54, Sterling Smith <sm...@fu...>
> wrote:
> >
> > Sean,
> >
> > Do you need an `annotate`, or just a `text`? `text` has the `transform`
> keyword, to which you can pass `ax.transAxes`.
> >
> > ax.text(.9,.9, r"$\mathbf{" + lab +
> ")}$”,transform=ax.transAxes,ha=‘right’,va=‘center’)
> >
> > -Sterling
> >
> > On May 26, 2015, at 10:06AM, Sean Lake <ody...@gm...> wrote:
> >
> >> Hello all,
> >>
> >> I'm using matplotlib 1.4.3 installed using fink with python 2.7.
> >>
> >> I'm trying to produce a grid of plots using gridspec that has
> annotations to label each plot.
> >>
> >> Here is the call to annotate the current axes:
> >> ax.annotate( r"$\mathbf{" + lab + ")}$",
> >> xy=(0.5*(xmin+xmax), 0.5*(ymin+ymax)),
> >> xytext=(0.9, 0.9),
> >> textcoords="axes fraction", fontsize=14 )
> >>
> >> Where ax is initialized by:
> >> ax = plt.subplot(gs[ coords[0], coords[1] ])
> >>
> >> and gs by:
> >> gs = mpgs.GridSpec( 3, 2, wspace=0.0, hspace=0.0 )
> >>
> >> The trouble comes in when abs(ymax) < abs(ymin). When that is true, the
> labels are offset upward by one row, for some reason.
> >>
> >> I've attached a script that demonstrates the problem, and an example of
> the output. I can work around this problem by using "data" coordinates, but
> even so this reveals a bug somewhere.
> >>
> >> Thanks,
> >> Sean Lake
> >>
> >>
> <BugDemo.py><BugDemo.pdf>------------------------------------------------------------------------------
> >> One dashboard for servers and applications across Physical-Virtual-Cloud
> >> Widest out-of-the-box monitoring support with 50+ applications
> >> Performance metrics, stats and reports that give you Actionable Insights
> >> Deep dive visibility with transaction tracing using APM Insight.
> >>
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
> >> Matplotlib-users mailing list
> >> Mat...@li...
> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Sean L. <ody...@gm...> - 2015-05-26 19:00:22
|
Sterling,
Thanks for the pointer. I've already used a workaround where I used "data" coordinates and put it at:
0.9 * (xmax - xmin) + xmin, and similar for y.
I'm really only reporting this so that it can be fixed if there is someone who does need to annotate something in a grid.
Sean
> On May 26, 2015, at 11:54, Sterling Smith <sm...@fu...> wrote:
>
> Sean,
>
> Do you need an `annotate`, or just a `text`? `text` has the `transform` keyword, to which you can pass `ax.transAxes`.
>
> ax.text(.9,.9, r"$\mathbf{" + lab + ")}$”,transform=ax.transAxes,ha=‘right’,va=‘center’)
>
> -Sterling
>
> On May 26, 2015, at 10:06AM, Sean Lake <ody...@gm...> wrote:
>
>> Hello all,
>>
>> I'm using matplotlib 1.4.3 installed using fink with python 2.7.
>>
>> I'm trying to produce a grid of plots using gridspec that has annotations to label each plot.
>>
>> Here is the call to annotate the current axes:
>> ax.annotate( r"$\mathbf{" + lab + ")}$",
>> xy=(0.5*(xmin+xmax), 0.5*(ymin+ymax)),
>> xytext=(0.9, 0.9),
>> textcoords="axes fraction", fontsize=14 )
>>
>> Where ax is initialized by:
>> ax = plt.subplot(gs[ coords[0], coords[1] ])
>>
>> and gs by:
>> gs = mpgs.GridSpec( 3, 2, wspace=0.0, hspace=0.0 )
>>
>> The trouble comes in when abs(ymax) < abs(ymin). When that is true, the labels are offset upward by one row, for some reason.
>>
>> I've attached a script that demonstrates the problem, and an example of the output. I can work around this problem by using "data" coordinates, but even so this reveals a bug somewhere.
>>
>> Thanks,
>> Sean Lake
>>
>> <BugDemo.py><BugDemo.pdf>------------------------------------------------------------------------------
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y_______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
|
|
From: Sean L. <ody...@gm...> - 2015-05-26 17:07:08
|
Hello all,
I'm using matplotlib 1.4.3 installed using fink with python 2.7.
I'm trying to produce a grid of plots using gridspec that has annotations to label each plot.
Here is the call to annotate the current axes:
ax.annotate( r"$\mathbf{" + lab + ")}$",
xy=(0.5*(xmin+xmax), 0.5*(ymin+ymax)),
xytext=(0.9, 0.9),
textcoords="axes fraction", fontsize=14 )
Where ax is initialized by:
ax = plt.subplot(gs[ coords[0], coords[1] ])
and gs by:
gs = mpgs.GridSpec( 3, 2, wspace=0.0, hspace=0.0 )
The trouble comes in when abs(ymax) < abs(ymin). When that is true, the labels are offset upward by one row, for some reason.
I've attached a script that demonstrates the problem, and an example of the output. I can work around this problem by using "data" coordinates, but even so this reveals a bug somewhere.
Thanks,
Sean Lake
|
|
From: Benjamin R. <ben...@ou...> - 2015-05-26 16:49:29
|
On Tue, May 26, 2015 at 12:36 PM, Raj Kumar Manna <raj...@gm...> wrote: > import matplotlib.pyplot as plt > from mpl_toolkits.mplot3d import Axes3D > import numpy as np > > # create a 21 x 21 vertex mesh > xx, yy = np.meshgrid(np.linspace(0,1,21), np.linspace(0,1,21)) > > # create vertices for a rotated mesh (3D rotation matrix) > X = xx > Y = yy > Z = 10*np.ones(X.shape) > > # create some dummy data (20 x 20) for the image > data = np.cos(xx) * np.cos(xx) + np.sin(yy) * np.sin(yy) > > # create the figure > fig = plt.figure() > > # show the reference image > ax1 = fig.add_subplot(121) > ax1.imshow(data, cmap=plt.cm.BrBG, interpolation='nearest', > origin='lower', extent=[0,1,0,1]) > > # show the 3D rotated projection > ax2 = fig.add_subplot(122, projection='3d') > ax2.plot_surface(X, Y, Z, rstride=1, cstride=1, > facecolors=plt.cm.BrBG(data), shade=False) > The call to imshow() without vmin/vmax arguments will automatically scale the colormap to cover the entire range of values. Meanwhile, when you did plt.cm.BrBG(data), it assumed that the vmin/vmax is 0 and 1, respectively. The min and max of your data is actually 0.292 and 1.708. If you normalize your data, it should look much more correct. Cheers! Ben Root |
|
From: Raj K. M. <raj...@gm...> - 2015-05-26 16:36:58
|
Hi, How to plot a imshow() image in 3d axes? I was trying with this post <http://stackoverflow.com/a/25295272/4920782>. In that post, the surface plot looks same as imshow() plot but actually they are not. To demonstrate, here I took different data: import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np # create a 21 x 21 vertex mesh xx, yy = np.meshgrid(np.linspace(0,1,21), np.linspace(0,1,21)) # create vertices for a rotated mesh (3D rotation matrix) X = xx Y = yy Z = 10*np.ones(X.shape) # create some dummy data (20 x 20) for the image data = np.cos(xx) * np.cos(xx) + np.sin(yy) * np.sin(yy) # create the figure fig = plt.figure() # show the reference image ax1 = fig.add_subplot(121) ax1.imshow(data, cmap=plt.cm.BrBG, interpolation='nearest', origin='lower', extent=[0,1,0,1]) # show the 3D rotated projection ax2 = fig.add_subplot(122, projection='3d') ax2.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=plt.cm.BrBG(data), shade=False) The plots are here <http://www.physics.iitm.ac.in/%7Eraj/imshow_plot_surface.png>. Is there any other way to solve this issue? I have posted this question <http://stackoverflow.com/questions/30464117/plotting-a-imshow-image-in-3d-in-matplotlib> on stackoverflow. Thanks Raj -- ################################################################## Raj Kumar Manna Complex Fluid & Biological Physics Lab IIT Madras Ph. No. 8144637401 alternate email: ra...@ph... <raj...@gm...> #################################################################### |
|
From: David H. <DH...@ra...> - 2015-05-26 15:38:36
|
I removed all calls to threads and swapped Gdk.threads_add_timeout to Glib.timeout_add (See attached. However if I comment the call to self.canvas.draw(), the python memory utilisation sits at 30.8Mb.
from gi.repository import Gtk, Gdk, GLib
from matplotlib.figure import Figure
# Tell matplotlib to use a GTK canvas for drawing
#from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas
from matplotlib.backends.backend_gtk3cairo import FigureCanvasGTK3Cairo as FigureCanvas
# Application Class
class pyMatPlotLibTest(object):
def update_gui(self):
y = [self.index] * 1024
self.index += 1
if self.index > 1024: self.index = 0
#Gdk.threads_enter()
self.line.set_ydata(y)
self.axes.set_title("%d" % self.index)
self.canvas.draw()
#Gdk.threads_leave()
return True
def __init__(self):
self.index = 0
self.x = range(1024)
# Initialise the threads system and allow threads to work with GTK
#GLib.threads_init()
# Draw scope
self.figure = Figure(dpi=100)
self.canvas = FigureCanvas(self.figure) # a Gtk.DrawingArea
#self.widget.alignment_ScopeDisplay.add(self.canvas)
# Draw initial scope
self.axes = self.figure.add_subplot(111)
self.line, = self.axes.plot(self.x, [0]* 1024)
self.axes.set_title("None")
self.axes.set_xbound(0.0, 1024)
self.axes.set_ybound(-16, 1040)
self.window_main = Gtk.Window(title="pyMatPlotLibTest")
self.window_main.connect("destroy", lambda x: Gtk.main_quit())
self.window_main.add(self.canvas)
self.window_main.show_all()
# Ticker for the update of the input state monitoring
GLib.timeout_add(10, self.update_gui)
#Gdk.threads_add_timeout(priority = GLib.PRIORITY_DEFAULT_IDLE,
# interval = 10, # msec
# function = self.update_gui)
Gtk.main()
if __name__ == "__main__":
gui = pyMatPlotLibTest()
From: ben...@gm... [mailto:ben...@gm...] On Behalf Of Benjamin Root
Sent: 26 May 2015 14:53
To: David Hughes
Cc: Matplotlib Users
Subject: Re: [Matplotlib-users] matplotlib.backends.backend_gtk3cairo memory leak
I take it that it doesn't happen using the GTK3Agg backend? What about the threading portion? Does it happen if you take the threading out?
Ben Root
On Tue, May 26, 2015 at 8:23 AM, David <dh...@ra...<mailto:dh...@ra...>> wrote:
Hi, I seem to have a memory leak while generating a 'live' plot display. This wasn't the case for GTK2, but the example below is consuming ~800k/second (Matplotlib 1.4.3, PyGI aio-3.14.0_rev18, Windows 7 x64, python 3.4.3). I have checked the garbage collector but it doesn't show anything interesting (no massive incrementing count of uncollected items). Anyway, I would be very grateful if somebody could confirm and/or fix this (or tell me what I'm doing wrong). Many thanks David Code below:
from gi.repository import Gtk, Gdk, GLib
from matplotlib.figure import Figure
# Tell matplotlib to use a GTK canvas for drawing
#from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas
from matplotlib.backends.backend_gtk3cairo import FigureCanvasGTK3Cairo as FigureCanvas
# Application Class
class pyMatPlotLibTest(object):
def update_gui(self):
y = [self.index] * 1024
self.index += 1
if self.index > 1024: self.index = 0
Gdk.threads_enter()
self.line.set_ydata(y)
self.axes.set_title("%d" % self.index)
self.canvas.draw()
Gdk.threads_leave()
return True
def __init__(self):
self.index = 0
self.x = range(1024)
# Initialise the threads system and allow threads to work with GTK
GLib.threads_init()
# Draw scope
self.figure = Figure(dpi=100)
self.canvas = FigureCanvas(self.figure) # a Gtk.DrawingArea
#self.widget.alignment_ScopeDisplay.add(self.canvas)
# Draw initial scope
self.axes = self.figure.add_subplot(111)
self.line, = self.axes.plot(self.x, [0]* 1024)
self.axes.set_title("None")
self.axes.set_xbound(0.0, 1024)
self.axes.set_ybound(-16, 1040)
self.window_main = Gtk.Window(title="pyMatPlotLibTest")
self.window_main.connect("destroy", lambda x: Gtk.main_quit())
self.window_main.add(self.canvas)
self.window_main.show_all()
# Ticker for the update of the input state monitoring
Gdk.threads_add_timeout(priority = GLib.PRIORITY_DEFAULT_IDLE,
interval = 10, # msec
function = self.update_gui)
Gtk.main()
if __name__ == "__main__":
gui = pyMatPlotLibTest()
________________________________
View this message in context: matplotlib.backends.backend_gtk3cairo memory leak<http://matplotlib.1069221.n5.nabble.com/matplotlib-backends-backend-gtk3cairo-memory-leak-tp45614.html>
Sent from the matplotlib - users mailing list archive<http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html> at Nabble.com.
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Matplotlib-users mailing list
Mat...@li...<mailto:Mat...@li...>
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Jens N. <jen...@gm...> - 2015-05-26 15:31:23
|
IGtk3Agg should work in you use cairocffi instead of py(2/3)cairo. AFAIK py(2/3)cairo is more or less unmaintained these days and that function has never been implemented in a released version. Best Jens tir. 26. maj 2015 kl. 16.27 skrev David <dh...@ra...>: > > I take it that it doesn't happen using the GTK3Agg backend? > GTK3Agg is unimplemented at the GTK3-end: > > File > "c:\Python34\lib\site-packages\matplotlib\backends\backend_gtk3agg.py", > line > 69, in on_draw_event > buf, cairo.FORMAT_ARGB32, width, height) > NotImplementedError: Surface.create_for_data: Not Implemented yet. > > > What about the threading portion? Does it happen if you take the > threading > > out? > I removed all calls to threads and swapped Gdk.threads_add_timeout to > Glib.timeout_add. This made little difference. > > However if I comment the call to self.canvas.draw(), the python memory > utilisation sits at 30.8Mb (but the graph does not update of course). > > Thanks > > David > > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/matplotlib-backends-backend-gtk3cairo-memory-leak-tp45614p45616.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: David H. <DH...@ra...> - 2015-05-26 15:28:32
|
Thanks, however GTK3Agg is unimplemented in at the GTK3-end:
File "c:\Python34\lib\site-packages\matplotlib\backends\backend_gtk3agg.py", line 69, in on_draw_event
buf, cairo.FORMAT_ARGB32, width, height)
NotImplementedError: Surface.create_for_data: Not Implemented yet.
Regards
David
From: ben...@gm... [mailto:ben...@gm...] On Behalf Of Benjamin Root
Sent: 26 May 2015 14:53
To: David Hughes
Cc: Matplotlib Users
Subject: Re: [Matplotlib-users] matplotlib.backends.backend_gtk3cairo memory leak
I take it that it doesn't happen using the GTK3Agg backend? What about the threading portion? Does it happen if you take the threading out?
Ben Root
On Tue, May 26, 2015 at 8:23 AM, David <dh...@ra...<mailto:dh...@ra...>> wrote:
Hi, I seem to have a memory leak while generating a 'live' plot display. This wasn't the case for GTK2, but the example below is consuming ~800k/second (Matplotlib 1.4.3, PyGI aio-3.14.0_rev18, Windows 7 x64, python 3.4.3). I have checked the garbage collector but it doesn't show anything interesting (no massive incrementing count of uncollected items). Anyway, I would be very grateful if somebody could confirm and/or fix this (or tell me what I'm doing wrong). Many thanks David Code below:
from gi.repository import Gtk, Gdk, GLib
from matplotlib.figure import Figure
# Tell matplotlib to use a GTK canvas for drawing
#from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas
from matplotlib.backends.backend_gtk3cairo import FigureCanvasGTK3Cairo as FigureCanvas
# Application Class
class pyMatPlotLibTest(object):
def update_gui(self):
y = [self.index] * 1024
self.index += 1
if self.index > 1024: self.index = 0
Gdk.threads_enter()
self.line.set_ydata(y)
self.axes.set_title("%d" % self.index)
self.canvas.draw()
Gdk.threads_leave()
return True
def __init__(self):
self.index = 0
self.x = range(1024)
# Initialise the threads system and allow threads to work with GTK
GLib.threads_init()
# Draw scope
self.figure = Figure(dpi=100)
self.canvas = FigureCanvas(self.figure) # a Gtk.DrawingArea
#self.widget.alignment_ScopeDisplay.add(self.canvas)
# Draw initial scope
self.axes = self.figure.add_subplot(111)
self.line, = self.axes.plot(self.x, [0]* 1024)
self.axes.set_title("None")
self.axes.set_xbound(0.0, 1024)
self.axes.set_ybound(-16, 1040)
self.window_main = Gtk.Window(title="pyMatPlotLibTest")
self.window_main.connect("destroy", lambda x: Gtk.main_quit())
self.window_main.add(self.canvas)
self.window_main.show_all()
# Ticker for the update of the input state monitoring
Gdk.threads_add_timeout(priority = GLib.PRIORITY_DEFAULT_IDLE,
interval = 10, # msec
function = self.update_gui)
Gtk.main()
if __name__ == "__main__":
gui = pyMatPlotLibTest()
________________________________
View this message in context: matplotlib.backends.backend_gtk3cairo memory leak<http://matplotlib.1069221.n5.nabble.com/matplotlib-backends-backend-gtk3cairo-memory-leak-tp45614.html>
Sent from the matplotlib - users mailing list archive<http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html> at Nabble.com.
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Matplotlib-users mailing list
Mat...@li...<mailto:Mat...@li...>
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: David <dh...@ra...> - 2015-05-26 15:25:56
|
> I take it that it doesn't happen using the GTK3Agg backend?
GTK3Agg is unimplemented at the GTK3-end:
File
"c:\Python34\lib\site-packages\matplotlib\backends\backend_gtk3agg.py", line
69, in on_draw_event
buf, cairo.FORMAT_ARGB32, width, height)
NotImplementedError: Surface.create_for_data: Not Implemented yet.
> What about the threading portion? Does it happen if you take the threading
> out?
I removed all calls to threads and swapped Gdk.threads_add_timeout to
Glib.timeout_add. This made little difference.
However if I comment the call to self.canvas.draw(), the python memory
utilisation sits at 30.8Mb (but the graph does not update of course).
Thanks
David
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/matplotlib-backends-backend-gtk3cairo-memory-leak-tp45614p45616.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Benjamin R. <ben...@ou...> - 2015-05-26 13:53:02
|
I take it that it doesn't happen using the GTK3Agg backend? What about the
threading portion? Does it happen if you take the threading out?
Ben Root
On Tue, May 26, 2015 at 8:23 AM, David <dh...@ra...> wrote:
> Hi, I seem to have a memory leak while generating a 'live' plot display.
> This wasn't the case for GTK2, but the example below is consuming
> ~800k/second (Matplotlib 1.4.3, PyGI aio-3.14.0_rev18, Windows 7 x64,
> python 3.4.3). I have checked the garbage collector but it doesn't show
> anything interesting (no massive incrementing count of uncollected items).
> Anyway, I would be very grateful if somebody could confirm and/or fix this
> (or tell me what I'm doing wrong). Many thanks David Code below:
>
> from gi.repository import Gtk, Gdk, GLib
>
>
> from matplotlib.figure import Figure
> # Tell matplotlib to use a GTK canvas for drawing
> #from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas
> from matplotlib.backends.backend_gtk3cairo import FigureCanvasGTK3Cairo as FigureCanvas
>
>
> # Application Class
> class pyMatPlotLibTest(object):
>
> def update_gui(self):
> y = [self.index] * 1024
>
> self.index += 1
> if self.index > 1024: self.index = 0
>
> Gdk.threads_enter()
> self.line.set_ydata(y)
> self.axes.set_title("%d" % self.index)
> self.canvas.draw()
> Gdk.threads_leave()
>
> return True
>
> def __init__(self):
> self.index = 0
> self.x = range(1024)
>
> # Initialise the threads system and allow threads to work with GTK
> GLib.threads_init()
>
> # Draw scope
> self.figure = Figure(dpi=100)
> self.canvas = FigureCanvas(self.figure) # a Gtk.DrawingArea
> #self.widget.alignment_ScopeDisplay.add(self.canvas)
>
> # Draw initial scope
> self.axes = self.figure.add_subplot(111)
> self.line, = self.axes.plot(self.x, [0]* 1024)
> self.axes.set_title("None")
> self.axes.set_xbound(0.0, 1024)
> self.axes.set_ybound(-16, 1040)
>
> self.window_main = Gtk.Window(title="pyMatPlotLibTest")
> self.window_main.connect("destroy", lambda x: Gtk.main_quit())
> self.window_main.add(self.canvas)
> self.window_main.show_all()
>
> # Ticker for the update of the input state monitoring
> Gdk.threads_add_timeout(priority = GLib.PRIORITY_DEFAULT_IDLE,
> interval = 10, # msec
> function = self.update_gui)
> Gtk.main()
>
>
> if __name__ == "__main__":
> gui = pyMatPlotLibTest()
>
>
> ------------------------------
> View this message in context: matplotlib.backends.backend_gtk3cairo
> memory leak
> <http://matplotlib.1069221.n5.nabble.com/matplotlib-backends-backend-gtk3cairo-memory-leak-tp45614.html>
> Sent from the matplotlib - users mailing list archive
> <http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html> at
> Nabble.com.
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
|
|
From: David <dh...@ra...> - 2015-05-26 12:23:55
|
Hi, I seem to have a memory leak while generating a 'live' plot display. This
wasn't the case for GTK2, but the example below is consuming ~800k/second
(Matplotlib 1.4.3, PyGI aio-3.14.0_rev18, Windows 7 x64, python 3.4.3). I
have checked the garbage collector but it doesn't show anything interesting
(no massive incrementing count of uncollected items). Anyway, I would be
very grateful if somebody could confirm and/or fix this (or tell me what I'm
doing wrong).Many thanksDavidCode below:
from gi.repository import Gtk, Gdk, GLibfrom matplotlib.figure import
Figure# Tell matplotlib to use a GTK canvas for drawing#from
matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as
FigureCanvasfrom matplotlib.backends.backend_gtk3cairo import
FigureCanvasGTK3Cairo as FigureCanvas# Application Classclass
pyMatPlotLibTest(object): def update_gui(self): y = [self.index] *
1024 self.index += 1 if self.index > 1024: self.index = 0
Gdk.threads_enter() self.line.set_ydata(y)
self.axes.set_title("%d" % self.index) self.canvas.draw()
Gdk.threads_leave() return True def __init__(self):
self.index = 0 self.x = range(1024) # Initialise the
threads system and allow threads to work with GTK GLib.threads_init()
# Draw scope self.figure = Figure(dpi=100) self.canvas =
FigureCanvas(self.figure) # a Gtk.DrawingArea
#self.widget.alignment_ScopeDisplay.add(self.canvas) # Draw initial
scope self.axes = self.figure.add_subplot(111) self.line, =
self.axes.plot(self.x, [0]* 1024) self.axes.set_title("None")
self.axes.set_xbound(0.0, 1024) self.axes.set_ybound(-16, 1040)
self.window_main = Gtk.Window(title="pyMatPlotLibTest")
self.window_main.connect("destroy", lambda x: Gtk.main_quit())
self.window_main.add(self.canvas) self.window_main.show_all()
# Ticker for the update of the input state monitoring
Gdk.threads_add_timeout(priority = GLib.PRIORITY_DEFAULT_IDLE,
interval = 10, # msec function =
self.update_gui) Gtk.main()if __name__ == "__main__": gui =
pyMatPlotLibTest()
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/matplotlib-backends-backend-gtk3cairo-memory-leak-tp45614.html
Sent from the matplotlib - users mailing list archive at Nabble.com. |