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
(38) |
2
(31) |
3
(9) |
|
4
(13) |
5
(24) |
6
(11) |
7
(8) |
8
(14) |
9
(7) |
10
(4) |
|
11
(7) |
12
(11) |
13
(16) |
14
(19) |
15
(11) |
16
(9) |
17
(3) |
|
18
(4) |
19
(47) |
20
(28) |
21
(9) |
22
(9) |
23
(11) |
24
|
|
25
|
26
(12) |
27
(22) |
28
(20) |
29
(16) |
30
(19) |
|
|
From: Darren D. <dsd...@gm...> - 2010-04-18 16:48:00
|
On Tue, Apr 13, 2010 at 8:14 PM, Gökhan Sever <gok...@gm...> wrote:
> Hello,
>
> Could someone confirm me if there is any malfunctioning using these simple
> figure functions?
>
> plt.figure(figsize=(2,3))
>
> plt.figure(figsize=(5,6))
>
> plt.figure(figsize=(9,15))
>
> plt.figure(figsize=(19,5))
>
> For some reason I can't get Qt4Agg creating last two figures in specified
> sizes. (WXAgg works fine.)
>
> matplotlib.__version__
> '1.0.svn'
>
> matplotlib.__revision__
> '$Revision: 8226 $'
>
> from PyQt4 import QtCore
> QtCore.PYQT_VERSION_STR
> '4.7'
I can reproduce this behavior with a pure pyqt4 example with no mpl
code, see below. I asked for advice on the pyqt mailing list.
import sys
from PyQt4 import QtCore, QtGui
class Test(QtGui.QWidget):
def __init__(self, width, height):
QtGui.QWidget.__init__(self)
#self.setSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
print 'Central widget should have width=%d, height=%d' %(width, height)
self._width = width
self._height = height
def sizeHint(self):
return QtCore.QSize(self._width, self._height)
app = QtGui.QApplication([])
m = QtGui.QMainWindow()
c = Test(1000, 700)
m.setCentralWidget(c)
m.show()
s = c.size()
print 'but central widget has width=%d, height=%d'% (s.width(), s.height())
sys.exit(app.exec_())
|
|
From: Ryan M. <rm...@gm...> - 2010-04-18 14:42:09
|
On Sun, Apr 18, 2010 at 12:10 AM, Gary Ruben <gr...@bi...> wrote: > I've been helping a fairly new Python user (an astronomer using > numpy/scipy/matplotlib) in my office get up to speed with matplotlib and > thought I'd pass on a couple of small thoughts about the documentation > which we think would make life clearer for new users. I'm putting this > out for discussion, because it may be totally off-the-mark. On the other > hand, it may point to some easy changes to make things clearer for new > users. > > First, I think that a new user, presented with the mpl homepage, reads > the intro on that page, then perhaps clicks through to either the > pyplot, examples, or gallery pages. They may take example code from > examples or gallery and modify them for their own plots, but they will > at some point be referencing the pyplot page (this is also my > most-visited page on the site). > > The matplotlib.pyplot page would really benefit from a few introductory > paragraphs or even a single sentence with a link to the relevant section > in the docs, explaining what the relationship of pyplot is to the other > parts of mpl. > Specifically, I think confusion arises because the explanation about the > stateful nature of the pyplot interface is (I think) first mentioned at > the start of the pyplot tutorial page, and is perhaps not emphasized > enough. It may also be worth stating somewhere in the front-page mpl > intro that it is recommended that new users do the pyplot tutorial. > > The signatures that a new user sees are full of *args and **kwargs which > is confusing for the new user. There is an explanation in the coding > guide so perhaps another paragraph or sentence+link to this would help, > but I think it's probably not a good idea to be directing new users into > the coding guide. I know about the history of this and I gather that > most or all of the args are actually tabulated in the documentation now, > but new users don't necessarily know what *args and **kwargs mean. I > think there's still a general lack of consistency in the pyplot docs > related to this. Some docstrings have the call signature shown, with > default values shown. It's confusing that some kwargs have explicit > descriptions and appear in the call signature whereas others are just > "additional kwargs". This split seems to me to be exposing the > underlying implementation of the function to the user. I don't know > whether there is logic behind this. > > The final area of confusion is to do with jargon, as this seems to creep > into examples and list discussions. The introduction to the Artist > Tutorial is quite useful for understanding mpl's plotting model. > However, for the new user, it is pretty much impenetrable due to the > jargon and references to other libraries and coding concepts that a new > user doesn't need to know. I think a gentler description of mpl's > plotting model in the introduction or in a standalone small chapter > would be helpful for new users. The documentation exists to help the users, so if you're having trouble with them, the docs probably *are* lacking. I know I'm not likely to get to this any time soon however, so patches are welcome. :) If you're interested, the docs live here: http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/doc/ Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma |
|
From: Gary R. <gr...@bi...> - 2010-04-18 05:06:55
|
I've been helping a fairly new Python user (an astronomer using numpy/scipy/matplotlib) in my office get up to speed with matplotlib and thought I'd pass on a couple of small thoughts about the documentation which we think would make life clearer for new users. I'm putting this out for discussion, because it may be totally off-the-mark. On the other hand, it may point to some easy changes to make things clearer for new users. First, I think that a new user, presented with the mpl homepage, reads the intro on that page, then perhaps clicks through to either the pyplot, examples, or gallery pages. They may take example code from examples or gallery and modify them for their own plots, but they will at some point be referencing the pyplot page (this is also my most-visited page on the site). The matplotlib.pyplot page would really benefit from a few introductory paragraphs or even a single sentence with a link to the relevant section in the docs, explaining what the relationship of pyplot is to the other parts of mpl. Specifically, I think confusion arises because the explanation about the stateful nature of the pyplot interface is (I think) first mentioned at the start of the pyplot tutorial page, and is perhaps not emphasized enough. It may also be worth stating somewhere in the front-page mpl intro that it is recommended that new users do the pyplot tutorial. The signatures that a new user sees are full of *args and **kwargs which is confusing for the new user. There is an explanation in the coding guide so perhaps another paragraph or sentence+link to this would help, but I think it's probably not a good idea to be directing new users into the coding guide. I know about the history of this and I gather that most or all of the args are actually tabulated in the documentation now, but new users don't necessarily know what *args and **kwargs mean. I think there's still a general lack of consistency in the pyplot docs related to this. Some docstrings have the call signature shown, with default values shown. It's confusing that some kwargs have explicit descriptions and appear in the call signature whereas others are just "additional kwargs". This split seems to me to be exposing the underlying implementation of the function to the user. I don't know whether there is logic behind this. The final area of confusion is to do with jargon, as this seems to creep into examples and list discussions. The introduction to the Artist Tutorial is quite useful for understanding mpl's plotting model. However, for the new user, it is pretty much impenetrable due to the jargon and references to other libraries and coding concepts that a new user doesn't need to know. I think a gentler description of mpl's plotting model in the introduction or in a standalone small chapter would be helpful for new users. Gary R. |
|
From: Gökhan S. <gok...@gm...> - 2010-04-17 22:59:49
|
Hello, Let say we have a figure created by: plt.plot(range(100)) On WX backend plt.grid(1) or key "G" responds finely for turning on/off the grid lines. However when I log-scale both axes then plt.grid(1 or 0) or "G" doesn't respond on minor grid lines. Is there a way to control this behavior? Thanks. -- Gökhan |
|
From: Friedrich R. <fri...@gm...> - 2010-04-17 17:08:40
|
2010/4/15 KrishnaPribadi <Kri...@ha...>: > Is there any way to just turn > off the exponent number in the right corner and force the x tick labels to > be integers or floating point depending on how close one is zoomed? Have a look at matplotlib/ticker.py. Most classes in ticker.py are derived from class ticker.TickHelper. This in turn has a method .set_axis(). So I think when you write your own formatter class, you should be able to make use of this, because I guess it's called upon attachment of the formatter to the axis, by the axis instance it's attached to. This means, you should be able to retrieve the view limits from the .axis attribute during __call__() of the formatter, so you can choose the format used appropriate according to the view span. Maybe, just as a thought, you should also have a look at the Locator class you're using, to find out how the decision is made, when to use integer tick positions and when to use fp ones. I think you should derive your formatter class from class ticker.Formatter. hth, Friedrich |
|
From: Thomas R. <tho...@gm...> - 2010-04-17 14:58:21
|
Hello, I am currently using the sphinxext module to write documentation that includes automatically generated plots. I was wondering if there is a way to override the default savefig behavior for this - for example, I would like all the plots for the documentation to have the bbox_inches='tight' option to avoid any unnecessary whitespace. Is this something that can be done? Thanks, Thomas |
|
From: Vamsi V. <vam...@gm...> - 2010-04-16 22:19:48
|
Adding line:
ax.set_xlabel("asdf")
To file (matplotlib examples):
http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_gtk2.py
This sets the X-Label under the navigation toolbar. I am unable to set it
such a way that the entire canvas is rendered in the container.
It would be of great help to know how this can be done.
Thanks,
W
|
|
From: Josh H. <jh...@vn...> - 2010-04-16 22:00:36
|
OK, I am finally posting some code. The graphic it will produce is similar to above. I mocked up some time series data and fit one of the regression lines using PyIMSL Studio (Scipy for the other one). Full disclosure: I am on the PyIMSL Studio team at Rogue Wave Software. You can use PyIMSL Studio for free for noncommercial use, and you can choose to install just the math/stat/data libraries under site-packages like any other Python package. But, as for the matplotlib calls themselves, hopefully the code is clear and a useful example. Cheers. http://old.nabble.com/file/p28272259/matplotlib_gallery_scatter.py matplotlib_gallery_scatter.py ----- Josh Hemann Statistical Advisor http://www.roguewave.com//" Rogue Wave Software jhemann at vni dizzot com -- View this message in context: http://old.nabble.com/How-to-overlay-an-image-on-a-multi-plot--tp28111498p28272259.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Keegan C. <kc...@kc...> - 2010-04-16 17:34:12
|
Hello,
I have written a small script that, I think, demonstrates a memory leak
in savefig. A search of the mailing list shows a thread started by Ralf
Gommers <ral...@go...> about 2009-07-01 that seems to
cover a very similar issue. I have appended the demonstration script at
the end of this e-mail text.
The demonstration script script sits in a relatively tight loop creating
figures then saving them while monitoring memory usage. A plot of VmRSS
vs. number of loop iterations as generated on my system is attached as
"data.png" (you can create your own plots with the sample script).
Although I have only tested this on Fedora 12, I expect that most Linux
users should be able to run the script for themselves. Users should be
able to comment out the "savefig" line and watch memory usage go from
unbounded to (relatively) bounded.
Can anybody see a cause for this leak hidden in my code? Has anybody
seen this issue and solved it? I would also appreciate it if other
people would run this script and report their findings so that there
will be some indication of the problem's manifestation frequency.
Sincerely,
Keegan Callin
************************************************************************
'''Script to demonstrate memory leakage in savefig call.
Requirements:
Tested in Fedora 12. It should work on other systems where
/proc/{PID}/status files exist and those files contain a 'VmRSS' entry
(this is how the script monitors its memory usage).
System Details on Original Test System:
[keegan@grizzly test]$ uname -a
Linux grizzly 2.6.32.9-70.fc12.x86_64 #1 SMP Wed Mar 3 04:40:41 UTC 2010
x86_64 x86_64 x86_64 GNU/Linux
[keegan@grizzly ~]$ gcc --version
gcc (GCC) 4.4.3 20100127 (Red Hat 4.4.3-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[keegan@grizzly ~]$ cd ~/src/matplotlib-0.99.1.1
[keegan@grizzly matplotlib-0.99.1.1]$ rm -rf build
[keegan@grizzly matplotlib-0.99.1.1]$ python setup.py build &> out.log
[keegan@grizzly matplotlib-0.99.1.1]$ head -38 out.log
============================================================================
BUILDING MATPLOTLIB
matplotlib: 0.99.1.1
python: 2.6.4 (r264:75706, Jan 20 2010, 12:34:05) [GCC
4.4.2 20091222 (Red Hat 4.4.2-20)]
platform: linux2
REQUIRED DEPENDENCIES
numpy: 1.4.0
freetype2: 9.22.3
OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.43
Tkinter: no
* TKAgg requires Tkinter
wxPython: no
* wxPython not found
Gtk+: no
* Building for Gtk+ requires pygtk; you must be
able
* to "import gtk" in your build/install environment
Mac OS X native: no
Qt: no
Qt4: no
Cairo: no
OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: matplotlib will provide
pytz: 2010b
OPTIONAL USETEX DEPENDENCIES
dvipng: no
ghostscript: 8.71
latex: no
pdftops: 0.12.4
[Edit setup.cfg to suppress the above messages]
============================================================================
[keegan@grizzly matplotlib-0.99.1.1]$ bzip2 out.log
# out.log.bz2 is attached to the message containing this program.
[keegan@grizzly ~]$ python2.6
Python 2.6.4 (r264:75706, Jan 20 2010, 12:34:05)
[GCC 4.4.2 20091222 (Red Hat 4.4.2-20)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
>>> matplotlib.__version__
'0.99.1.1'
'''
# Import standard python modules
import sys
import os
from ConfigParser import SafeConfigParser as ConfigParser
from cStringIO import StringIO
# import numpy
import numpy
from numpy import zeros
# Import matplotlib
from matplotlib.figure import Figure
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
def build_figure(a):
'''Returns a new figure containing array a.'''
# Create figure and setup graph
fig = Figure()
FigureCanvas(fig)
ax = fig.add_subplot(1, 1, 1)
ax.plot(a)
return fig
_proc_status = '/proc/%d/status' % os.getpid()
def load_status():
'''Returns a dict of process statistics from from
/proc/{PID}/status.'''
status = {}
with open(_proc_status) as f:
for line in f:
key, value = line.split(':', 1)
key = key.strip()
value = value.strip()
status[key] = value
return status
def main():
data_file = 'data.txt'
image_file = 'data.png'
num_iterations = 1000
with open(data_file, 'w') as f:
# Tried running without matplotlib or numpy such that the
# only thing happening in the process is the dumping of process
# status information to `data_file` from the loop. Memory
# usage reaches a bound _very_ quickly.
status = load_status()
rss, unit = status['VmRSS'].split()
print >>f, rss
print 'Executing', num_iterations, 'iterations.'
a = zeros(10000)
for i in xrange(0, num_iterations):
# Shift random data is being shifted into a numpy array.
# With numpy and the process status dump enabled, memory
# usage reaches a bound very quickly.
a[0:-1] = a[1:]
a[-1] = numpy.random.rand(1)[0]
# When figures of the array are generated in each loop,
# memory reaches a bound more slowly(~50 iterations) than
# without matplotlib; nevertheless, memory usage still
# appears to be bounded.
fig = build_figure(a)
# Savefig alone causes memory usage to become unbounded.
# Memory usage increase seems to be linear with the number
# of iterations.
sink = StringIO()
fig.savefig(sink, format='png', dpi=80, transparent=False,
bbox_inches="tight", pad_inches=0.15)
# This line below can be used to demonstrate that StringIO
# does not leak without the savefig call.
#sink.write(1000*'hello')
sink.close()
status = load_status()
rss, unit = status['VmRSS'].split()
print >>f, rss
sys.stdout.write('#')
sys.stdout.flush()
# Load process statistics and save them to a file.
print
print 'Graphing memory usage data from', data_file, 'to', image_file
with open(data_file) as f:
rss = [int(r) for r in f]
fig = build_figure(rss)
with open(image_file, 'wb') as f:
fig = build_figure(rss)
fig.savefig(f, format='png', dpi=80, transparent=False,
bbox_inches="tight", pad_inches=0.15)
return 0
if __name__ == '__main__':
sys.exit(main())
|
|
From: KrishnaPribadi <Kri...@ha...> - 2010-04-16 16:09:55
|
Hi, I'm trying to add some navigation tools to my mpl embedded in a wx app. I noticed the default navigation tools here: http://matplotlib.sourceforge.net/users/navigation_toolbar.html?highlight=matplotlib%20widgets http://matplotlib.sourceforge.net/users/navigation_toolbar.html?highlight=matplotlib%20widgets and am able to implement them using this example: http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_wx2.html http://matplotlib.sourceforge.net/examples/user_interfaces/embedding_in_wx2.html . However, I don't want to add the toolbar to the bottom of my canvas or to any part of my canvas. I want to add the toolbar, or actually more specifically, add the pan, zoom, and save buttons to a different panel and sizer. So far I tried adding the navigation toolbar to a different sizer, which is on a different panel, but toolbar always shows up on the canvas. Can someone suggest some methods on how to: 1. force and add the navigation toolbar to a different sizer or panel? 2. Add select buttons from the navigation toolbar to a different sizer or panel than where the canvas is located? Here is my example code: #Boa:Frame:Frame1 import wx import numpy as np import matplotlib as mpl mpl.use('WXAgg') from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg from matplotlib.backends.backend_wx import NavigationToolbar2Wx from matplotlib.figure import Figure def create(parent): return Frame1(parent) [wxID_FRAME1, wxID_FRAME1PANEL1, wxID_FRAME1PANEL2, ] = [wx.NewId() for _init_ctrls in range(3)] class Frame1(wx.Frame): def _init_coll_bshPanels_Items(self, parent): # generated method, don't edit parent.AddWindow(self.panel1, 4, border=0, flag=wx.EXPAND) parent.AddWindow(self.panel2, 1, border=0, flag=wx.EXPAND) def _init_sizers(self): # generated method, don't edit self.bshPanels = wx.BoxSizer(orient=wx.HORIZONTAL) self.bsvPanel1 = wx.BoxSizer(orient=wx.VERTICAL) self.bsvPanel2 = wx.BoxSizer(orient=wx.VERTICAL) self._init_coll_bshPanels_Items(self.bshPanels) self.SetSizer(self.bshPanels) self.panel1.SetSizer(self.bsvPanel1) self.panel2.SetSizer(self.bsvPanel2) def _init_ctrls(self, prnt): # generated method, don't edit wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=prnt, pos=wx.Point(-870, 286), size=wx.Size(718, 547), style=wx.DEFAULT_FRAME_STYLE, title='Frame1') self.SetClientSize(wx.Size(710, 520)) self.panel1 = wx.Panel(id=wxID_FRAME1PANEL1, name='panel1', parent=self, pos=wx.Point(0, 0), size=wx.Size(568, 520), style=wx.RAISED_BORDER | wx.TAB_TRAVERSAL) self.panel2 = wx.Panel(id=wxID_FRAME1PANEL2, name='panel2', parent=self, pos=wx.Point(568, 0), size=wx.Size(142, 520), style=wx.TAB_TRAVERSAL) self._init_sizers() def __init__(self, parent): self._init_ctrls(parent) self.InitCanvas() self.AddToolBar() self.AddToolBarBtns() self.t = np.arange(0, np.pi*2, 0.01) self.x = np.sin(2*np.pi*self.t) self.myplot = self.ax.plot(self.t, self.x, 'b') self.canvas.draw() def InitCanvas(self): self.fig = Figure(None) self.canvas = FigureCanvasWxAgg(self.panel1, -1, self.fig) self.bsvPanel1.Add(self.canvas, -1, wx.EXPAND) ## self.panel1.Fit() self.ax = self.fig.add_subplot(111) self.ax.grid('On') return True def AddToolBar(self): self.toolbar = NavigationToolbar2Wx(self.canvas) self.toolbar.Realize() tw, th = self.toolbar.GetSizeTuple() fw, fh = self.canvas.GetSizeTuple() self.toolbar.SetSize(wx.Size(fw, th)) #Trying to add to different sizer than to whom the canvas belongs self.bsvPanel2.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) #but this doesn't work. The toolbar is still on the canvas, #but disapears as soon as I resize or do a redraw. #Need correct code here, please. self.toolbar.update() return True def AddToolBarBtns(self): '''add specific tool buttons from the navigatio toolbar to panel2''' #need code here, if possible pass if __name__ == '__main__': app = wx.PySimpleApp() frame = create(None) frame.Show() app.MainLoop() ----- Krishna Adrianto Pribadi Test Engineer Harley-Davidson Motor Co. Talladega Test Facility Vehicle Test Stands -- View this message in context: http://old.nabble.com/navigationtoolbar%3A-1.-force-location--2.-add-select-button%28s%29-only-tp28268828p28268828.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Dr. P. M. F. <pfe...@ve...> - 2010-04-16 14:49:11
|
I would like to specify the colors to be used for plotting out-of-range values via RGB triples rather than color name strings. Is this possible? -- View this message in context: http://old.nabble.com/possible-to-specify-RGB-in-set_under-or-set_over--tp28267842p28267842.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Samuel T. S. <arc...@gm...> - 2010-04-16 13:44:40
|
Hi all... my code is that: http://dpaste.com/184551/ the problem is that code is using on an web app. When I request the graph after press submit button they generate the graph perfect I do that for 6, 7 times with the same value to generate the graph so after that the graph breaks, like if exceed the values to generate the graph and became a single line... what I have to do to fix that? thanks in advanced... Samuel p.s.: I note if I restart the application (like go to home of my web app and restart the process to call the form to fill data and request the graph, they fix, but when I request again with the form already filled before, they break the graph on second request... |
|
From: Yves R. <yve...@ep...> - 2010-04-16 08:56:36
|
Dear list,
I want to plot colored points using scatter, with the
color of points corresponding to the log of the z value of the points.
the corresponding scatter command is :
scatter(x,y,c=z,norm=colors.LogNorm())
unfortunately, then I then draw a colorbar simply calling
colorbar()
the fonts used for the color bar is no longer in latex mode,
as it was if I use a lin scale in scatter(), i.e., norm=None.
Is it a bug ?
Any solution ?
Thanks,
yves
--
(o o)
--------------------------------------------oOO--(_)--OOo-------
Dr. Yves Revaz
Laboratory of Astrophysics EPFL
Observatoire de Sauverny Tel : ++ 41 22 379 24 28
51. Ch. des Maillettes Fax : ++ 41 22 379 22 05
1290 Sauverny e-mail : Yve...@ep...
SWITZERLAND Web : http://www.lunix.ch/revaz/
----------------------------------------------------------------
|
|
From: Ryan M. <rm...@gm...> - 2010-04-16 04:15:27
|
I'm having a problem with the rendering of stixsans fonts again. Not
as bad as the baseline before, but some odd text placement:
import matplotlib.pyplot as plt
from matplotlib import rcParams
rcParams['font.size'] = 8.0
rcParams['mathtext.default'] = 'regular'
rcParams['mathtext.fontset'] = 'stixsans'
fig = plt.figure(dpi=100)
plt.text(0.5,0.5,'$Velocity \,Spectrum \, (m \,s^{-1})$')
plt.show()
I've attached images from both the 'regular' setting above and for
'mathtext.default' set to 'rm', which actually makes things
worse. It's also quite noticable for larger font sizes with 'rm'.
Thoughts?
Ryan
On Wed, Feb 25, 2009 at 4:13 PM, Ryan May <rm...@gm...> wrote:
> Hi,
>
> When I combine mathtext with the stixsans fonts while mathtext.default is
> set to 'regular', horizontal text is not vertically aligned properly, like
> the baseline is moving. I've attached an image of what I see when I run the
> following code. It should be noted that I don't see anything like this on
> the vertical axis, and it all goes away if I stop using mathtext.
>
> import matplotlib.pyplot as plt
> from matplotlib import rcParams
> rcParams['font.size'] = 12.0
> rcParams['mathtext.default'] = 'regular'
> rcParams['mathtext.fontset'] = 'stixsans'
>
> fig = plt.figure()
>
> plt.xlabel('ItLooksToMeLikeTheBaselineMoves $(g m^{-3})$')
> plt.ylabel('ItLooksToMeLikeTheBaselineMoves $(db km^{-1})$')
> plt.show()
>
>
> Thoughts? Am I doing something bad? Can anyone else reproduce this?
>
> Ryan
>
> --
> Ryan May
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma
> Sent from: Norman Oklahoma United States.
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
|
|
From: KrishnaPribadi <Kri...@ha...> - 2010-04-15 20:56:30
|
I just tried this method and it does work if you are using integers or whole
numbers. However, I am working with time on my x axis. So when I zoom too
close, floating point numbers are required... Is there any way to just turn
off the exponent number in the right corner and force the x tick labels to
be integers or floating point depending on how close one is zoomed?
David Simpson-3 wrote:
>
> I also had some trouble with exponents in an axis, getting
> 0.0 to 3.0 on the axis, with +1.998e3. I wanted the years
> 1998 to 2001 instead. I solved this using the following code
> (with the solution bits commented out):
>
> #!/usr/bin/env python
> from pylab import *
> # from matplotlib.ticker import FormatStrFormatter
>
> x = array([ 1998, 1999, 2000, 2001 ])
> y = array([ 2.3, 4.5, 2.6, 7.2 ])
>
> # ax=subplot(111)
> plot(x,y)
>
> ## Needed to get 2001, not 1+2e3:
> # majorFormatter=FormatStrFormatter('%d')
> # ax.xaxis.set_major_formatter(majorFormatter)
> # show()
>
>
> Dave
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
-----
Krishna Adrianto Pribadi
Test Engineer
Harley-Davidson Motor Co.
Talladega Test Facility
Vehicle Test Stands
--
View this message in context: http://old.nabble.com/Re%3A-Forcing-full-value-on-axis-%28Dave-Simpson%29-tp10175415p28260517.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Friedrich R. <fri...@gm...> - 2010-04-15 19:56:47
|
2010/4/14 Andreas Hilboll <li...@hi...>: > So my question is: What do I need to do so that the colorbar actually has > the > range as specified by my colorNorm? We had a beautiful discussion about this recently under "Making a data-driven colormap", maybe this helps. Friedrich |
|
From: David Ho <it...@uc...> - 2010-04-15 19:28:07
|
Hi all! I have a quick newbie question. matplotlib's specgram() by default plots a spectrogram with a linear y-axis (frequency). However, for many applications, it's better to look at a log-frequency spectrogram. Is there an easy way to plot a spectrogram using a logarithmic frequency axis? Thanks for your help! --David Ho |
|
From: Alan G I. <ala...@gm...> - 2010-04-15 15:12:04
|
http://matplotlib.sourceforge.net/api/collections_api.html#matplotlib.collections.LineCollection |
|
From: Martin B. <mar...@go...> - 2010-04-15 14:55:05
|
Hello Matplotlib-Community, I'm quite sure that I've seen a figure containing a multicolered graph somewhere, maybe on stackoverflow or at scipy.org. Unfortunately, I'm not able to find it anymore. Anyone knows the link? Anyone knows howto? Thanks very much indeed, greetings, Martin |
|
From: Antony L. <ann...@gm...> - 2010-04-15 09:57:52
|
Hello, I'd like to know if there's some way of copying a LineCollection or a ContourSet (or any other Artist, actually) from one figure to another. More precisely, I have to figures using identical axes (one being a grayscale image and the other a thresholded version of the image) ; I have written a script to tag parts of the thresholded image (which gives me ContourSets), and I want to copy these to the grayscale image. Any help would be greatly appreciated. Thanks in advance, Antony |
|
From: Eric F. <ef...@ha...> - 2010-04-15 07:19:00
|
Thomas Robitaille wrote: > Hi, > > Last year, I submitted a bug report regarding the fact that PatchCollection's match_original argument does not work properly, in a pretty simple script: > > https://sourceforge.net/tracker/?func=detail&aid=2881485&group_id=80706&atid=560720 > > I came across the problem again several times recently, even with the svn version of matplotlib, and other people have also mentioned the issue to me. I just wanted to bring up this issue again, in case it can easily be fixed. > > Thanks, > > Thomas My first fix was flawed; svn r8231 looks better. Eric |
|
From: Eric F. <ef...@ha...> - 2010-04-15 07:11:17
|
Thomas Robitaille wrote: > Hi, > > Last year, I submitted a bug report regarding the fact that PatchCollection's match_original argument does not work properly, in a pretty simple script: > > https://sourceforge.net/tracker/?func=detail&aid=2881485&group_id=80706&atid=560720 > > I came across the problem again several times recently, even with the svn version of matplotlib, and other people have also mentioned the issue to me. I just wanted to bring up this issue again, in case it can easily be fixed. > > Thanks, > > Thomas Thomas, Thanks for the reminder. I think I have fixed the problem. Eric |
|
From: Peter B. <bu...@gm...> - 2010-04-15 04:43:08
|
On Thu, Apr 15, 2010 at 5:16 AM, Peter Butterworth <bu...@gm...> wrote: > matlab colors seem to follow html : > http://www.mathworks.com/access/helpdesk/help/techdoc/ref/colorspec.html for c, m, y but not for green, where matplotlib does follow html ... |
|
From: Thomas R. <tho...@gm...> - 2010-04-15 04:32:35
|
Hi, Last year, I submitted a bug report regarding the fact that PatchCollection's match_original argument does not work properly, in a pretty simple script: https://sourceforge.net/tracker/?func=detail&aid=2881485&group_id=80706&atid=560720 I came across the problem again several times recently, even with the svn version of matplotlib, and other people have also mentioned the issue to me. I just wanted to bring up this issue again, in case it can easily be fixed. Thanks, Thomas |
|
From: Peter B. <bu...@gm...> - 2010-04-15 03:17:06
|
matlab colors seem to follow html : http://www.mathworks.com/access/helpdesk/help/techdoc/ref/colorspec.html I would agree that "yellow" is not very readable at all. Could possibly the short-hand colors be made user configurable in .matplotlibrc to suit individual taste ? In any case, this issue needs to be mentioned in the documentation. On Wed, Apr 14, 2010 at 9:58 PM, Eric Firing <ef...@ha...> wrote: > John Hunter wrote: >> >> On Wed, Apr 14, 2010 at 2:14 PM, Jae-Joon Lee <lee...@gm...> >> wrote: >> >>> John, the relevant code to define the "colors" attribute seems to be >>> written by you. Maybe this is some matlab convention? Can you comment >>> on this? >> >> The original color letters did come from matlab, and some of the color >> RGB choices, like the background for the subplot gray, I got using a >> color picker on my screen for maximum compatibility, but I do not >> recall if that was the case for 'm', 'c' and 'y'. Most likely these >> were the rgb values of the matlab colors. >> >> The html colors were submitted later by another user, and apparently >> we never checked for consistency. I think this is a wart, and I >> don't feel strongly about keeping it or changing it for consistency in >> the trunk ahead of 1.0 (it should remain as is on the branch). If we >> change it on the trunk, we should change the single letter codes to >> correspond to the html full color name standards, rather than the >> other way around. > > I would be cautious about making this change. At least on my laptop screen, > with the default white axes background, the single-letter colors show up > better than the html versions. It makes sense to me for the single-letter > colors to be chosen for good visibility and contrast in actual use, not for > consistency with the html names. In fact, I see no good argument for > consistency in this case. > > Eric > > >> >> JDH -- thanks, peter butterworth |