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
(20) |
2
(8) |
|
3
(2) |
4
(7) |
5
(17) |
6
(20) |
7
(17) |
8
(18) |
9
(7) |
|
10
(4) |
11
(9) |
12
(20) |
13
(20) |
14
(17) |
15
(8) |
16
(2) |
|
17
(4) |
18
(4) |
19
(13) |
20
(4) |
21
(16) |
22
(9) |
23
(1) |
|
24
(5) |
25
(8) |
26
(13) |
27
(25) |
28
(25) |
29
(14) |
30
(10) |
|
31
(1) |
|
|
|
|
|
|
|
From: Steve C. <ste...@ya...> - 2005-07-24 11:49:28
|
On Wed, 2005-07-20 at 20:27 -0700, mat...@li... wrote: > Hello everyone, > > I just upgraded my matplotlib from 0.80 to to 0.83.1 and discovered a bug in the GTK backend. To be specific, the following code, beginning by line 171 in backend_gtk.py, is the problem: > > > def motion_notify_event(self, widget, event): > if event.is_hint: > x, y, state = event.window.get_pointer() > else: > x = event.x > y = event.y > state = event.state > > # flipy so y=0 is bottom of canvas > y = self.figure.bbox.height() - y > > if state: > FigureCanvasBase.motion_notify_event(self, x, y) > return True > > > > Due to the 'if state' clause, the Canvas will only receive the 'motion_notify_event' if at the same time the mouse button is pressed. This has not been the case in previous version of matplotlib. There is e.g. no such distinction in backend_qt.py. > > Regards, > > Niklas Volbers. I agree, the if clause should not be there, and have removed it from cvs. If the state information is required it should be passed as an argument to FigureCanvasBase.motion_notify_event() , like x and y are. Regards Steve Send instant messages to your online friends http://au.messenger.yahoo.com |
|
From: Stephen W. <ste...@cs...> - 2005-07-23 04:33:19
|
gf wrote: >Hi, >I downloaded and tried to install matplotlib-0.83.1 under Redhat >Enterprise Linux 4.... > >/usr/include/pygtk-2.0/pygobject.h:140: error: expected `,' or `...' >before "typename" >/usr/include/pygtk-2.0/pygobject.h:147: error: expected `,' or `...' >before "typename" > > They haven't fixed this yet!?! I think this problem is a year or more old now. In the file named above, there is a variable named "typename", but "typename" is now a reserved word in C. Just edit the lines listed above and change "typename" to "_typename" and the problem will go away. |
|
From: Rick K. <ke...@gm...> - 2005-07-22 22:49:48
|
On 7/22/05, John Hunter <jdh...@ac...> wrote: > >>>>> "Rick" =3D=3D Rick Kwan <ke...@gm...> writes: >=20 > > ax.xaxis.set_major_locator(LinearLocator(top)) > > xlabs =3D ax.set_xticklabels(['evt%d'%i for i in range(top)]) >=20 > LinearLocator(12) doesn't mean place ticks on the integers from 1-12 > -- it says to make 12 linearly spaced ticks. If you know where you > want the ticks and what you want the labels to be, use >=20 > xticks(locs,labels) >=20 > as in >=20 ... I knew there had to be an elegant solution. Thanks very much. --Rick Kwan |
|
From: John H. <jdh...@ac...> - 2005-07-22 20:02:12
|
>>>>> "Rick" == Rick Kwan <ke...@gm...> writes:
> ax.xaxis.set_major_locator(LinearLocator(top))
> xlabs = ax.set_xticklabels(['evt%d'%i for i in range(top)])
LinearLocator(12) doesn't mean place ticks on the integers from 1-12
-- it says to make 12 linearly spaced ticks. If you know where you
want the ticks and what you want the labels to be, use
xticks(locs,labels)
as in
from pylab import *
top = 11. # 11 produces point on grid
#top = 12. # 12 produces skewed data points
ind = arange(top)
ax = subplot(111)
plot(ind, ind, 'gd-')
grid(True)
labels = ['evt%d'%i for i in ind]
xticks(ind, labels)
show()
|
|
From: Alan G I. <ai...@am...> - 2005-07-22 19:15:05
|
On Thu, 21 Jul 2005, Rick Kwan apparently wrote: > I'm trying to produce a 2D plot of data points where the > X-axis represents a sequence of named events. A grid and > xticklabels have been enabled for clarity. > For a sample size of 11, all the points fall on the grid. For 12, > they do not. Beyond that seems to be on a case-by-case basis. > I'm sure I must be abusing the relationship between ticks and data, > but the proper solution eludes me. > from pylab import * > # top = 11 # 11 produces point on grid > top = 12 # 12 produces skewed data points > iter = [i for i in range(top)] > ax = subplot(111) > plot(iter, iter, 'gd-') > grid(True) > ax.xaxis.set_major_locator(LinearLocator(top)) > xlabs = ax.set_xticklabels(['evt%d'%i for i in range(top)]) > show() Count the gridlines. ;-) You are mislabeling the tics. (You might set the axes ranges explicitly to address this.) hth, Alan Isaac |
|
From: gf <gyr...@gm...> - 2005-07-22 17:43:57
|
Hi,
I downloaded and tried to install matplotlib-0.83.1 under Redhat
Enterprise Linux 4.
Unfortunately, I am getting errors that are apparently related to
compilation of the C++ code (see below).
I don't know C++ and am at a loss as to what to do next.=20
I'd appreciate any help you can provide me in remedying these problems.
Thanks.
-g
=3D=3D=3D
$: uname -a
Linux localhost.localdomain 2.6.9-11.ELsmp #1 SMP Thu Jun 9 15:33:26
CDT 2005 i686 i686 i386 GNU/Linux
=3D=3D=3D
$: python
Python 2.3.4 (#1, Feb 18 2005, 12:15:38)=20
[GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
=3D=3D=3D
$: python setup.py build =20
running build
running build_py
running build_ext
building 'matplotlib.backends._gtkagg' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -m32
-march=3Di386 -mtune=3Dpentium4 -D_GNU_SOURCE -fPIC -fPIC
-I/usr/local/include -I/usr/include -Isrc -Iswig -Iagg23/include -I.
-I/usr/local/include -I/usr/include -I/usr/local/include/freetype2
-I/usr/include/freetype2 -Isrc/freetype2 -Iswig/freetype2
-Iagg23/include/freetype2 -I./freetype2 -I/usr/local/include/freetype2
-I/usr/include/freetype2 -I/usr/local/include -I/usr/include
-I/usr/include/pygtk-2.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0
-I/usr/include/pango-1.0 -I/usr/include/freetype2
-I/usr/include/freetype2/config -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/python2.3 -c
src/_gtkagg.cpp -o build/temp.linux-i686-2.3/src/_gtkagg.o
In file included from /usr/include/python2.3/Python.h:8,
from /usr/include/pygtk-2.0/pygobject.h:5,
from src/_gtkagg.cpp:10:
/usr/include/python2.3/pyconfig.h:850:1: warning: "_POSIX_C_SOURCE" redefin=
ed
In file included from /usr/include/string.h:26,
from
/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../../include/c++/3.4.3/cstring:=
51,
from src/_gtkagg.cpp:1:
/usr/include/features.h:150:1: warning: this is the location of the
previous definition
In file included from src/_gtkagg.cpp:10:
/usr/include/pygtk-2.0/pygobject.h:140: error: expected `,' or `...'
before "typename"
/usr/include/pygtk-2.0/pygobject.h:147: error: expected `,' or `...'
before "typename"
error: command 'gcc' failed with exit status 1
=3D=3D=3D
|
|
From: R. K. <re...@gm...> - 2005-07-22 15:53:42
|
Thanks for the reply. I work with lidar data, which like radar data can span many decades. There is often negative values in the data so taking the log of the data can be annoying (depending on the programming environment). Also, the log of the data is less meaningful (to me) so that means I'll end up changing the labels on the colorabar. I guess you say it is also the principle of the matter. I'll give your suggestion a try as soon as I have some time. Thanks! Ralph p.s. I'm just learning python and I just recently discovered matplotlib (I've been using matlab for a long time) and I think it is very well done. Great job. On 7/21/05, John Hunter <jdh...@ac...> wrote: > >>>>> <re...@gm...> writes: >=20 > I have image data 2d array with values that spans several > decades. It would be extremely useful for me to be able > to plot this data with imshow using a colorbar/color > scale that is logarithmic. In the past I have just taken > the log of the data, but that solution is not really > acceptable for me. Any suggestions would be > welcome. Perhaps someone could give me a idea on how to > modify matplotlib to have this functionality. Thanks. >=20 > Jean-Luc also posted recently asking for logarithmic color scaling. > I would have thought that taking the log of your image data *would* > work for you. Can you explain why this doesn't -- I haven't worked > with logarithmic image data before so assume you are talking to a > newbie. >=20 > Note you can provide your own custom normalization and colormap > instances to imshow. These are generic functionals, so you should e > able to do anything you want. There is an example of writing a custom > normalization and colormap instance here >=20 > http://sourceforge.net/mailarchive/message.php?msg_id=3D12339259 >=20 > If you write one that does what you need, please post it back here so > it can be folded into the mainline. If you have trouble with this, if > you just describe more thoroughly what you need one of us might be > able to do it. >=20 > JDH > |
|
From: Alan G I. <ai...@am...> - 2005-07-22 13:49:09
|
On Thu, 21 Jul 2005, John Hunter apparently wrote: > In principle, you can use the > backends.backend_tkagg.new_figure_manager to manage the > figures you create. This will handle window creation and > destruction. You could also use > backends.backend_tkagg.show instead of starting the > mainloop yourself. But the usual way is to manage the GUI > stuff yourself and just use the mpl canvas and optionally, > the toolbar, because when you do GUI programming you want > maximal control. Something came up where it pylab is a little awkward. So I put a toe in the water of Matplotlib's more object oriented side. This is just a user report/rumination on some puzzles that arose when approaching Matplotlib's OO API, for whatever it may be worth. If you just want to save a figure to file, moving to the OO API feels like a small but rewarding step. But if you want GUI aspects, it feels different. Specifically, it feels like one is immediately forced to thing substantially about GUI aspects that might (?) have been hidden for a while longer. I will give two examples. 1. I'm using TkAgg. I expected to find something like def show_tkagg(figure,title=''): from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg window = Tk.Tk() window.wm_title(title) canvas = FigureCanvasTkAgg(figure, master=window) canvas.draw() canvas.get_tk_widget().pack() Tk.mainloop() but with more functionality. I did not find such a thing (which does not mean it's not there of course), and even new_figure_manager seems less intuitive. The idea, in any case, is that with such functions I could move more "gently" into the GUI realm where my experience is limited (i.e., nil). Also the hope lingers that if I need to change backends I can just change a 'use' and a 'show_...' and be done. 2. This example is more speculative, since I know even less what I'm talking about. But when I see something like toolbar = NavigationToolbar2TkAgg( canvas, root ) toolbar.update() canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) I wonder why something like canvas.add_toolbar(location,...) is not available to abstract from the GUI specific considerations. Of course as a complete newbie in this arena I am not really entitled to wonder such things, but there it is. I am not "proposing" anything here. I'm just a user trying to be helpful by illustrating the kinds of questions that might arise for other users as they dig a little deeper into this amazing tool. Cheers, Alan Isaac |
|
From: Steve S. <el...@gm...> - 2005-07-22 13:06:06
|
Hi Here the test. As you can see the points 1,2,3 are red, 4 and 5 are purple and 6 and 7 are red. ======================================================================= elcorto@ramrod:~/Python/torsten/psa/test$ python overlay.py --verbose-helpful matplotlib data path /usr/share/matplotlib loaded rc file /usr/share/matplotlib/.matplotlibrc matplotlib version 0.81 verbose.level helpful interactive is False platform is linux2 numerix Numeric 23.8 font search path ['/usr/share/matplotlib'] loaded ttfcache file /home/elcorto/.ttffont.cache backend GTKAgg version 2.6.1 ======================================================================== cheers, steve John Hunter wrote: >>>>>>"Steve" == Steve Schmerler <el...@gm...> writes: > > > Steve> Hi all When I plot the same data set with say red and blue > Steve> markers, then mpl seems to mix the colors (red + blue -> > Steve> purple). How can I turn this behavior off? > > This doesn't sound right to me -- can you post an example which > exposes this problem and provide the backend you are using -- eg, run > your script with > > > python myscript.py --verbose-helpful > > and post the output along with myscript.py > > Thanks, > JDH > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Jean-Luc M. <jea...@fr...> - 2005-07-22 08:51:07
|
> It already exists:
>
> gca().set_yscale('log')
Thank you vrey much for the answer but I was probably not clear : What
I want to do is to have a logarithmic color scaling (ie zcale).
However I tried your method (it may be useful) :
import MLab,Numeric,pylab
a=Numeric.resize(MLab.rand(900),[30,30])
b=a
pylab.imshow(b)
pylab.gca().set_yscale('log')
but I obtain an error message :
ValueError: Cannot set nonpositive limits with log transform
Jean-Luc Menut
|
|
From: Rick K. <ke...@gm...> - 2005-07-22 00:02:03
|
Greetings, folks. I am a Matplotlib novice. I'm trying to produce a 2D plot of data points where the X-axis represents a sequence of named events. A grid and xticklabels have been enabled for clarity. For a sample size of 11, all the points fall on the grid. For 12, they do not. Beyond that seems to be on a case-by-case basis. I'm sure I must be abusing the relationship between ticks and data, but the proper solution eludes me. Below is a distilled version of the script. This was run on Matplotlib 0.65 and Numarray 1.1.1. We have similar problems with Matplotlib 0.80 and Numeric 23.8. What am I doing wrong? =20 --Rick Kwan ---- novice script starts here ---- from pylab import * # top =3D 11 # 11 produces point on grid top =3D 12 # 12 produces skewed data points iter =3D [i for i in range(top)] ax =3D subplot(111) plot(iter, iter, 'gd-') grid(True) ax.xaxis.set_major_locator(LinearLocator(top)) xlabs =3D ax.set_xticklabels(['evt%d'%i for i in range(top)]) show() |
|
From: Alan G I. <ai...@am...> - 2005-07-21 19:50:59
|
On Thu, 21 Jul 2005, John Hunter apparently wrote: > In principle, you can use the > backends.backend_tkagg.new_figure_manager to manage the > figures you create. This will handle window creation and > destruction. You could also use > backends.backend_tkagg.show instead of starting the > mainloop yourself. But the usual way is to manage the GUI > stuff yourself and just use the mpl canvas and optionally, > the toolbar, because when you do GUI programming you want > maximal control. Very helpful. Thanks, Alan |
|
From: John H. <jdh...@ac...> - 2005-07-21 19:07:07
|
>>>>> "Alan" == Alan G Isaac <ai...@am...> writes:
Alan> I was asking essentially if we can deal only with matplotlib
Alan> objects and not (directly) with Tkinter objects. (So, e.g.,
Alan> we would not explicitly import Tkinter and set its mainloop,
Alan> and would not explicitly construct the Tk object.)
In principle, you can use the
backends.backend_tkagg.new_figure_manager to manage the figures you
create. This will handle window creation and destruction. You could
also use backends.backend_tkagg.show instead of starting the mainloop
yourself. But the usual way is to manage the GUI stuff yourself and
just use the mpl canvas and optionally, the toolbar, because when you
do GUI programming you want maximal control.
JDH
|
|
From: Alan G I. <ai...@am...> - 2005-07-21 17:05:22
|
Alan asked: > http://matplotlib.sourceforge.net/examples/embedding_in_tk.py > choice of backend never implies that we can avoid > explicitly embedding, as this example illustrates, right? On Thu, 21 Jul 2005, John Hunter apparently wrote: > I don't understand what this means.... Perhaps my question is completely at odds with the whole point of the object oriented structure in matplotlib, which I have yet to grok, but ... I was asking essentially if we can deal only with matplotlib objects and not (directly) with Tkinter objects. (So, e.g., we would not explicitly import Tkinter and set its mainloop, and would not explicitly construct the Tk object.) I do not *mind* dealing with Tkinter this way; I just want to confirm that this is "minimal". (E.g., that there is not something analagous to canvas.print_figure when producing a GUI display, which would do basic Tkinter bookkeeping for a figure display.) Thanks, Alan |
|
From: Mark B. <ma...@gm...> - 2005-07-21 16:41:49
|
I just set the tick list to be an empty list. In pylab: >>> from pylab import * >>> plot([1,2,3]) [<matplotlib.lines.Line2D instance at 0x015F4FA8>] >>> xticks([]) Is that what you want to do? Mark |
|
From: Christian M. <mee...@un...> - 2005-07-21 16:33:29
|
Hi Is there an easy way to plot the errorbar in a semilog plot (= something which is already implemented in matplotlib and has not to be written)? Right now I'm having something like: a.errorbar(x.ichannel,x.intensity,x.intensity_error,fmt='r.') a.semilogy(x.ichannel,x.intensity,'k%s' % y) 'a' being a subplot. 'x.ichannel','x.intensity', and 'x.intensity_error' are Numeric arrays. (Just for completeness: 'y' is a linestyle.) This only displays the logarithm of the intensity but the direct measure of the error - and not the logarithm. Any way out of this, other than writing some own code? TIA Cheers Christian |
|
From: John H. <jdh...@ac...> - 2005-07-21 14:52:10
|
>>>>> "Jeff" == Jeff Peery <jef...@se...> writes:
Jeff> Hello, Was wondering if it is possible to rotate a histogram
Jeff> 90 degrees? How do I do this?
Try replacing Axes.hist in site-packages/matplotlib/axes.py with the
function below. You can call it with
hist(randn(10000), 100, orientation='horizontal');
Jeff> Also I want to change the labels and fontsize and things of
Jeff> my tick labels. I'm using the backend WXAgg and I'm using
Jeff> pylab.setp to set the tick attributes. Is this an ok thing
Jeff> to do? I was under the impression that if I'm using a
Jeff> backend like WXAgg that I want to stay away from pylab
Jeff> because it has its own interface? Is this true? If it is
Jeff> true is there something like setp for WXAgg? Thanks!!
Yes, this is true. Do not mix pylab with OO matplotlib. You can get
the setp function from matplotlib.artist, which is where pylab gets it from
from matplotlib.artist import setp
JDH
def hist(self, x, bins=10, normed=0, bottom=0,
orientation='vertical', **kwargs):
"""
HIST(x, bins=10, normed=0, bottom=0, orientiation='vertical', **kwargs)
Compute the histogram of x. bins is either an integer number of
bins or a sequence giving the bins. x are the data to be binned.
The return values is (n, bins, patches)
If normed is true, the first element of the return tuple will be the
counts normalized to form a probability distribtion, ie,
n/(len(x)*dbin)
orientation = 'horizontal' | 'vertical'. If horizontal, barh
will be used and the "bottom" kwarg will be the left.
kwargs are used to update the properties of the
hist bars
"""
if not self._hold: self.cla()
n,bins = matplotlib.mlab.hist(x, bins, normed)
width = 0.9*(bins[1]-bins[0])
if orientation=='horizontal':
patches = self.barh(n, bins, height=width, left=bottom)
else:
patches = self.bar(bins, n, width=width, bottom=bottom)
for p in patches:
p.update(kwargs)
return n, bins, silent_list('Patch', patches)
|
|
From: John H. <jdh...@ac...> - 2005-07-21 14:40:23
|
>>>>> "Alan" == Alan G Isaac <ai...@am...> writes:
Alan> I just want to see my figure displayed in a Tkinter window,
Alan> without using pylab, with no extras. No other goals right
Alan> now.
Alan> Is
Alan> http://matplotlib.sourceforge.net/examples/embedding_in_tk.py
Alan> essentially a *minimal* example of how to do this? (Aside
Alan> from the title and toolbar stuff.)
Yes, embedding_in_tk.py is essentially a minimal example (a truly
minimal example would have no toolbar). embedding_in_tk2.py shows an
example with no matplotlib toolbar but which adds a new button.
Alan> E.g., choice of backend never implies that we can avoid
Alan> explicitly embedding, as this example illustrates, right?
I don't understand what this means....
Alan> PS What happened to the object oriented "intro" that was
Alan> linked from the Matplotlib page for awhile? Or did I just
Alan> overlook it?
http://matplotlib.sourceforge.net/faq.html#OO
Cheers!
JDH
|
|
From: Darren D. <dd...@co...> - 2005-07-21 14:38:37
|
On Thursday 21 July 2005 10:22 am, John Hunter wrote:
> >>>>> "Woodrow" == Woodrow Smith <re...@gm...> writes:
>
> Woodrow> I have image data 2d array with values that spans several
> Woodrow> decades. It would be extremely useful for me to be able
> Woodrow> to plot this data with imshow using a colorbar/color
> Woodrow> scale that is logarithmic. In the past I have just taken
> Woodrow> the log of the data, but that solution is not really
> Woodrow> acceptable for me. Any suggestions would be
> Woodrow> welcome. Perhaps someone could give me a idea on how to
> Woodrow> modify matplotlib to have this functionality. Thanks.
>
> Jean-Luc also posted recently asking for logarithmic color scaling.
> I would have thought that taking the log of your image data *would*
> work for you. Can you explain why this doesn't -- I haven't worked
> with logarithmic image data before so assume you are talking to a
> newbie.
Someday I will also need to create images with logscale colorbars. Right now,
I think it is a matter of taking the log of the data, and then manually
changing the ticklabels on the colorbar (-1,0,1 -> 10^{-1}, 10^0, 10^1). It
would be nice if we could do this automatically.
--
Darren
|
|
From: John H. <jdh...@ac...> - 2005-07-21 14:30:37
|
>>>>> "Dev" == Dev Gorur <dg...@gm...> writes:
Dev> Hello, I found the following post on
Dev> matplotlib-users. However, post reading the 'docstring', I'm
Dev> still unable to figure it out. I don't know how to call the
Dev> __call__ function in LinearSegmentedColormap in colors.py.
Dev> Could someone please help me out? All I need is a one-line
Dev> command that tells me how to give this beast a number between
Dev> 0 and 1 and get an rgb tuple.
An instance of a class with a method __call__ can be called just like
any other function by adding parentheses after the instance
class JDH:
def __call__(self):
print 'you rang'
# create an instance of callable class JDH
jdh = JDH()
# now call the beast
jdh()
Since LinearSegmentedColormap defines call, you can do the same
>>> from matplotlib.cm import jet
>>> print jet(.5)
(0.47754585705249836, 1.0, 0.49019607843137258, 1.0)
JDH
|
|
From: John H. <jdh...@ac...> - 2005-07-21 14:26:07
|
>>>>> "Maria" == Maria Khomenko <mar...@ut...> writes:
Maria> Hi, I am looking for a way to remove two axis lines. What I
Maria> would like to have is x-axis and y-axis, but without the
Maria> lines at the top or to the right. I cannot find the option
Maria> where I can specify this and I'd appreciate if someone
Maria> could point it out to me.
This is not really possible but is something we plan to fix soon.
There are some workarounds, but a bit hackish and complicated (make
the axis_on property of the Axes False, use axvspan and axhspan to
make your own axis lines where you want them). If anyone has a little
example code showing this, please post.
JDH
|
|
From: John H. <jdh...@ac...> - 2005-07-21 14:24:14
|
>>>>> "Steve" == Steve Schmerler <el...@gm...> writes:
Steve> Hi all When I plot the same data set with say red and blue
Steve> markers, then mpl seems to mix the colors (red + blue ->
Steve> purple). How can I turn this behavior off?
This doesn't sound right to me -- can you post an example which
exposes this problem and provide the backend you are using -- eg, run
your script with
> python myscript.py --verbose-helpful
and post the output along with myscript.py
Thanks,
JDH
|
|
From: John H. <jdh...@ac...> - 2005-07-21 14:22:59
|
>>>>> "Woodrow" == Woodrow Smith <re...@gm...> writes:
Woodrow> I have image data 2d array with values that spans several
Woodrow> decades. It would be extremely useful for me to be able
Woodrow> to plot this data with imshow using a colorbar/color
Woodrow> scale that is logarithmic. In the past I have just taken
Woodrow> the log of the data, but that solution is not really
Woodrow> acceptable for me. Any suggestions would be
Woodrow> welcome. Perhaps someone could give me a idea on how to
Woodrow> modify matplotlib to have this functionality. Thanks.
Jean-Luc also posted recently asking for logarithmic color scaling.
I would have thought that taking the log of your image data *would*
work for you. Can you explain why this doesn't -- I haven't worked
with logarithmic image data before so assume you are talking to a
newbie.
Note you can provide your own custom normalization and colormap
instances to imshow. These are generic functionals, so you should e
able to do anything you want. There is an example of writing a custom
normalization and colormap instance here
http://sourceforge.net/mailarchive/message.php?msg_id=12339259
If you write one that does what you need, please post it back here so
it can be folded into the mainline. If you have trouble with this, if
you just describe more thoroughly what you need one of us might be
able to do it.
JDH
|
|
From: John H. <jdh...@ac...> - 2005-07-21 14:18:09
|
>>>>> "Tom" == Tom Denniston <tom...@gm...> writes:
Tom> I am trying to plot multiple values on a date plot. plot
Tom> allows for this but plot date tells me it only takes 5
Tom> arguments. Is there a reason for this difference? Am I
Tom> using the function incorrectly? Does anyone know of a work
Tom> around? The exception is below:
You are using it correctly -- plot_date doesn't support multiple x,y
pairs; many plot functions do not, plot is more of an exception than
the rule here. plot_date could pass the arguments straight through to
plot, but this would break the default fmt argument ('bo') that
plot_date uses, which is different than the one plot uses.
JDH
|
|
From: John H. <jdh...@ac...> - 2005-07-21 14:08:02
|
>>>>> "andrea" == andrea gavana <and...@ti...> writes:
andrea> Question: why the RAM consumption does not decrease when I
andrea> close the Matplotlib frame? Shouldn't be the gc that takes
andrea> care of doing such action?
andrea> Thank you *a lot* for every suggestion, comment, opinion.
andrea> Sorry for the long post.
This could be a memory leak in the wxagg backend, or it could be a
problem in the way you code it. Please create a minimal
wxagg/matplotlib application that replicates the problem, one that we
can run on our side (just use random data for the plots you make).
Then we should be able to track down the bug.
Thanks!
JDH
|