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
(8) |
2
(2) |
3
(11) |
4
(11) |
|
5
(3) |
6
(3) |
7
(8) |
8
(1) |
9
(10) |
10
(16) |
11
(1) |
|
12
(8) |
13
(21) |
14
(13) |
15
(15) |
16
(6) |
17
(12) |
18
(2) |
|
19
(6) |
20
(6) |
21
(5) |
22
(2) |
23
(9) |
24
|
25
|
|
26
(2) |
27
(3) |
28
(2) |
29
(10) |
30
(2) |
31
(4) |
|
|
From: Benoist L. <be...@ib...> - 2010-12-16 08:19:18
|
Sorry for the delay. This is the script is used (modified so that it include the data). Le 15 déc. 10 à 16:50, Benjamin Root a écrit : > On Wed, Dec 15, 2010 at 9:46 AM, Benoist Laurent <be...@ib...> > wrote: > Hi all, > > I'm still a bit stuck with this probleme of polar annotation. > Let me present the problem in a different way. > > I've got the center of my circle, its radius and even some points on > the circle. > Actually, I'd like to annotate these points (red crosses in the > joined picture). > How would you do that? > > My best try gave me the green numbers. > > Thanks in advance, > Ben > > > > Can you include the source code (if it is simple) that you used to > generate this example, and we could probably help you out. > > Ben Root > |
|
From: Ben E. <bj...@ai...> - 2010-12-16 06:40:25
|
On Wed, Dec 15, 2010 at 08:02:42PM -0600, Benjamin Root wrote:
> Assuming you are doing a pcolor on some 2-D numpy array called 'z':
>
> ax.set_xlim(xmax=z.shape[1])
> ax.set_ylim(ymax=z.shape[0])
Thanks. I also found (after a bit of digging) that I could just use:
axis ('off')
Cheers, Ben
|
|
From: Paul I. <piv...@gm...> - 2010-12-16 06:00:04
|
Skip Montanaro, on 2010-12-15 12:49, wrote: > > Skip,You can call figlegend() and build a legend for the figure, > > irrespectively of any axes. > > Thanks. Sounds like exactly what I need. Hi Skip, I just wanted to chime in and give you a concrete example of how you can get all of the line instances from one axes and include them in the legend of another, or in a figlegend: ax = plt.subplot(1,2,1) ax2 = plt.subplot(1,2,2) ax.plot([0,1], label='ax1') ax2.plot([4,3], 'r--',label='ax2') lines =ax.get_lines() lines.extend(ax2.get_lines()) labels = [l.get_label() for l in lines] leg = ax.legend(lines, labels) # or, alternatively... leg2 = plt.figlegend(lines,labels,loc='center') this is a slight revision to what was previously discussed here: <http://old.nabble.com/aligning-multiple-legends-td29638901.html> -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 |
|
From: Åke K. <ake...@gm...> - 2010-12-16 04:24:45
|
I figured it out, I think. I read the docs ( http://matplotlib.sourceforge.net/api/figure_api.html#matplotlib.figure.Figure.add_axes) on add_axes and found the part about adding a label to a new axes to force matplotlib to add a new axes. So I changed this line from: subplot = self.figure.add_subplot(n_before + 1, 1, n_before + 1) to subplot = self.figure.add_subplot(n_before + 1, 1, n_before + 1, label='%s' % self.c) and everything works as advertised. On Thu, Dec 16, 2010 at 10:48 AM, Åke Kullenberg <ake...@gm...>wrote: > I am using matplotlib in wxpython to dynamically add subplots to a figure > and I am using the geometry_change() method to manage how they are shown. > Basically I want all subplot to share the space evenly in one column. With > the simple test code I have pasted in below I have run into some weird > behavior though. > > Two cases, one good and one weird. (launch the wxpython app and do as > follows to replicate) > > Good behavior: > 1. Right-click in an empty frame. > 2. Click the 'add subplot' menu item to add a subplot. > 3. Repeat 1 & 2 to add a second subplot. > 4. Right-click on top of the LOWER subplot, and click the 'delete' menu > item to delete that particular subplot. > 5. Right-click and click the 'add subplot' menu item to add a second > subplot again. > > You will have some debug stuff in the console, but this run does exactly > what you would expect it to. You first end up with two subplots sharing the > column 50-50, you delete the LOWER one, and you add a second one again to > end up in the same situation, i.e., two subplots sharing the colum 50-50. > > Weird behavior: > 1. Right-click in an empty frame. > 2. Click the 'add subplot' menu item to add a subplot. > 3. Repeat 1 & 2 to add a second subplot. > 4. Right-click on top of the UPPER subplot, and click the 'delete' menu > item to delete that particular subplot. > 5. Right-click and click the 'add subplot' menu item to add a second > subplot again. > > This time you would of course expect the same behavior as above, but after > 5 you won't end up with two subplots sharing the column 50-50. Instead you > have one subplot (which is the most recent one you added) in upper half, and > the lower half is blank. > > Looking at the console after 5 it says this: > > add ---------------------------------------- > changing geometry for subplot 0 to (211) > adding subplot(212) > count=2 c=3 n_before=1 n_after=1 > -------------------------------------------- > > So it has changed the geometry as you would expect. It has also added the > new second subplot as you would expect too. But somehow the axes count > before and after is the same (n_before and n_after). In other words it looks > like it hasn't added the subplot with 212, it looks like 211 has been used > instead. > > Am I doing something stupid, or is this a bug os some sort? > > > Comment regarding the code. The Frame class has two attributes outside of > the usual figures etc, count & c. Both are simple counters. But while count > is increased/decreased as subplots are added/subtracted, c is only increased > as subplots are added it is never decreased. I then use c for making a > simple plot in every subplot. I made it that way so I could tell the > subplots apart. > > Code starts here: > > import wx > import matplotlib > matplotlib.use('wxagg') > from matplotlib.figure import Figure > from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as > FigureCanvas > > class Frame(wx.Frame): > def __init__(self, title): > wx.Frame.__init__(self, None, title=title, pos=(150,150), size=(800,800)) > self.panel = wx.Panel(self) > self.figure = Figure() > self.canvas = FigureCanvas(self, -1, self.figure) > self.figure.canvas.mpl_connect('button_press_event', self.OnEvent) > self.figure.canvas.draw() > self.Bind(wx.EVT_SIZE, self.OnSize) > self.count = 0 > self.c = 0 > def OnEvent(self, event): > self.clicked_axes = event.inaxes > if event.button == 3: > id_add_subplot = wx.NewId() > id_reset = wx.NewId() > self.Bind(wx.EVT_MENU, self.OnAddSubplot, id=id_add_subplot) > self.Bind(wx.EVT_MENU, self.OnReset, id=id_reset) > self.menu = wx.Menu() > self.menu.Append(id_add_subplot, "Add subplot") > self.menu.Append(id_reset, "Reset") > if self.clicked_axes is not None: > id_delete_subplot = wx.NewId() > self.Bind(wx.EVT_MENU, self.OnDeleteSubplot, id=id_delete_subplot) > self.menu.Append(id_delete_subplot, "Delete") > self.PopupMenu(self.menu) > self.menu.Destroy() > def OnDeleteSubplot(self, event): > self.count -= 1 > self.figure.delaxes(self.clicked_axes) > n = len(self.figure.axes) > print '' > print 'delete -------------------------------------' > for i in xrange(n): > print 'changing geometry for subplot %s to (%s%s%s)' % (i, n, 1, i + 1) > self.figure.axes[i].change_geometry(n, 1, i + 1) > self.figure.axes[i].update_params() > self.figure.subplots_adjust() > self.figure.canvas.draw() > print 'count=%s c=%s n=%s' % (self.count, self.c, n) > print '--------------------------------------------' > def OnAddSubplot(self, event): > self.count += 1 > self.c += 1 > n_before = len(self.figure.axes) > print '' > print 'add ----------------------------------------' > for i in xrange(n_before): > print 'changing geometry for subplot %s to (%s%s%s)' % (i, n_before + 1, 1, > i + 1) > self.figure.axes[i].change_geometry(n_before + 1, 1, i + 1) > self.figure.axes[i].update_params() > print 'adding subplot(%s%s%s)' % (n_before + 1, 1, n_before + 1) > subplot = self.figure.add_subplot(n_before + 1, 1, n_before + 1) > n_after = len(self.figure.axes) > subplot.plot([self.c,self.c,self.c]) > self.figure.subplots_adjust() > self.figure.canvas.draw() > print 'count=%s c=%s n_before=%s n_after=%s' % (self.count, self.c, > n_before, n_after) > print '--------------------------------------------' > def OnReset(self, event): > self.count = 0 > self.figure.clear() > self.figure.canvas.draw() > def OnSize(self, event): > pixels = tuple(event.GetSize()) > self.canvas.SetSize(pixels) > self.figure.set_size_inches(float(pixels[0])/self.figure.get_dpi(), > float(pixels[1])/self.figure.get_dpi()) > if __name__ == "__main__": > app = wx.PySimpleApp() > frame = Frame('Hello') > frame.Show() > app.MainLoop() > > |
|
From: Åke K. <ake...@gm...> - 2010-12-16 02:48:28
|
I am using matplotlib in wxpython to dynamically add subplots to a figure
and I am using the geometry_change() method to manage how they are shown.
Basically I want all subplot to share the space evenly in one column. With
the simple test code I have pasted in below I have run into some weird
behavior though.
Two cases, one good and one weird. (launch the wxpython app and do as
follows to replicate)
Good behavior:
1. Right-click in an empty frame.
2. Click the 'add subplot' menu item to add a subplot.
3. Repeat 1 & 2 to add a second subplot.
4. Right-click on top of the LOWER subplot, and click the 'delete' menu item
to delete that particular subplot.
5. Right-click and click the 'add subplot' menu item to add a second subplot
again.
You will have some debug stuff in the console, but this run does exactly
what you would expect it to. You first end up with two subplots sharing the
column 50-50, you delete the LOWER one, and you add a second one again to
end up in the same situation, i.e., two subplots sharing the colum 50-50.
Weird behavior:
1. Right-click in an empty frame.
2. Click the 'add subplot' menu item to add a subplot.
3. Repeat 1 & 2 to add a second subplot.
4. Right-click on top of the UPPER subplot, and click the 'delete' menu item
to delete that particular subplot.
5. Right-click and click the 'add subplot' menu item to add a second subplot
again.
This time you would of course expect the same behavior as above, but after 5
you won't end up with two subplots sharing the column 50-50. Instead you
have one subplot (which is the most recent one you added) in upper half, and
the lower half is blank.
Looking at the console after 5 it says this:
add ----------------------------------------
changing geometry for subplot 0 to (211)
adding subplot(212)
count=2 c=3 n_before=1 n_after=1
--------------------------------------------
So it has changed the geometry as you would expect. It has also added the
new second subplot as you would expect too. But somehow the axes count
before and after is the same (n_before and n_after). In other words it looks
like it hasn't added the subplot with 212, it looks like 211 has been used
instead.
Am I doing something stupid, or is this a bug os some sort?
Comment regarding the code. The Frame class has two attributes outside of
the usual figures etc, count & c. Both are simple counters. But while count
is increased/decreased as subplots are added/subtracted, c is only increased
as subplots are added it is never decreased. I then use c for making a
simple plot in every subplot. I made it that way so I could tell the
subplots apart.
Code starts here:
import wx
import matplotlib
matplotlib.use('wxagg')
from matplotlib.figure import Figure
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as
FigureCanvas
class Frame(wx.Frame):
def __init__(self, title):
wx.Frame.__init__(self, None, title=title, pos=(150,150), size=(800,800))
self.panel = wx.Panel(self)
self.figure = Figure()
self.canvas = FigureCanvas(self, -1, self.figure)
self.figure.canvas.mpl_connect('button_press_event', self.OnEvent)
self.figure.canvas.draw()
self.Bind(wx.EVT_SIZE, self.OnSize)
self.count = 0
self.c = 0
def OnEvent(self, event):
self.clicked_axes = event.inaxes
if event.button == 3:
id_add_subplot = wx.NewId()
id_reset = wx.NewId()
self.Bind(wx.EVT_MENU, self.OnAddSubplot, id=id_add_subplot)
self.Bind(wx.EVT_MENU, self.OnReset, id=id_reset)
self.menu = wx.Menu()
self.menu.Append(id_add_subplot, "Add subplot")
self.menu.Append(id_reset, "Reset")
if self.clicked_axes is not None:
id_delete_subplot = wx.NewId()
self.Bind(wx.EVT_MENU, self.OnDeleteSubplot, id=id_delete_subplot)
self.menu.Append(id_delete_subplot, "Delete")
self.PopupMenu(self.menu)
self.menu.Destroy()
def OnDeleteSubplot(self, event):
self.count -= 1
self.figure.delaxes(self.clicked_axes)
n = len(self.figure.axes)
print ''
print 'delete -------------------------------------'
for i in xrange(n):
print 'changing geometry for subplot %s to (%s%s%s)' % (i, n, 1, i + 1)
self.figure.axes[i].change_geometry(n, 1, i + 1)
self.figure.axes[i].update_params()
self.figure.subplots_adjust()
self.figure.canvas.draw()
print 'count=%s c=%s n=%s' % (self.count, self.c, n)
print '--------------------------------------------'
def OnAddSubplot(self, event):
self.count += 1
self.c += 1
n_before = len(self.figure.axes)
print ''
print 'add ----------------------------------------'
for i in xrange(n_before):
print 'changing geometry for subplot %s to (%s%s%s)' % (i, n_before + 1, 1,
i + 1)
self.figure.axes[i].change_geometry(n_before + 1, 1, i + 1)
self.figure.axes[i].update_params()
print 'adding subplot(%s%s%s)' % (n_before + 1, 1, n_before + 1)
subplot = self.figure.add_subplot(n_before + 1, 1, n_before + 1)
n_after = len(self.figure.axes)
subplot.plot([self.c,self.c,self.c])
self.figure.subplots_adjust()
self.figure.canvas.draw()
print 'count=%s c=%s n_before=%s n_after=%s' % (self.count, self.c,
n_before, n_after)
print '--------------------------------------------'
def OnReset(self, event):
self.count = 0
self.figure.clear()
self.figure.canvas.draw()
def OnSize(self, event):
pixels = tuple(event.GetSize())
self.canvas.SetSize(pixels)
self.figure.set_size_inches(float(pixels[0])/self.figure.get_dpi(),
float(pixels[1])/self.figure.get_dpi())
if __name__ == "__main__":
app = wx.PySimpleApp()
frame = Frame('Hello')
frame.Show()
app.MainLoop()
|
|
From: Benjamin R. <ben...@ou...> - 2010-12-16 02:03:09
|
On Wed, Dec 15, 2010 at 4:08 PM, Ben Elliston <bj...@ai...> wrote: > I am trying to plot an 840 x 680 element matrix using pcolor. > matplotlib has decided that the xrange should be 900 and the yrange > 700. Is there a way to tell matplotlib to always use x/yranges that > always match the dimensions of the matrix? > > Thanks, Ben > > Assuming you are doing a pcolor on some 2-D numpy array called 'z': ax.set_xlim(xmax=z.shape[1]) ax.set_ylim(ymax=z.shape[0]) That should make everything look right. You could also consider using imshow() which will automatically trim the limits for you. imshow() and pcolor() are slightly different, but can often serve similar purposes. I hope that helps! Ben Root |