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
(4) |
3
(9) |
4
(12) |
5
(12) |
6
(7) |
7
(8) |
8
(4) |
|
9
(2) |
10
(9) |
11
(6) |
12
(1) |
13
(20) |
14
(13) |
15
(9) |
|
16
(3) |
17
(12) |
18
(16) |
19
(14) |
20
(12) |
21
(15) |
22
(11) |
|
23
(5) |
24
(7) |
25
(7) |
26
(8) |
27
(11) |
28
(10) |
29
(1) |
|
30
(3) |
31
(6) |
|
|
|
|
|
|
From: Sterling S. <sm...@fu...> - 2011-10-17 23:00:35
|
Let me first say that I appreciate the work that the developers have put into matplotlib. You're doing a great job. I have filed a bug report at https://github.com/matplotlib/matplotlib/issues/533 wherein I post the following Consider: from pylab import * x = arange(0,1,.01) y = x**2 fig = figure(2) ax = fig.add_subplot(111) errorbar(x,y,yerr=x/10.,label='$x^2$') errorbar(x,y**3,yerr=x/10.,label='$x^6$') legend(loc='upper center') h,l = ax.get_legend_handles_labels() fig.legend(h,l,loc='lower right') I am getting the right legend for the axes based legend, but the figure based legend seems to be using the different parts of the errorbar for subsequent handles, instead of using them as a group. From what I can tell, this has appeared since the upgrade to version 1.1.0. I am running on Linux, python 2.7, gtkAgg backend. Thanks, Sterling |
|
From: Rich S. <rsh...@ap...> - 2011-10-17 23:00:02
|
On Mon, 17 Oct 2011, Benjamin Root wrote: > I only need the last line printed by that print statement. I want to see > how the parsing failed. Ben, Here are the last 3: Line: C 125 ; WX 273 ; N braceright ; B 55 -68 244 707 ; Line: C 126 ; WX 586 ; N asciitilde ; B 39 219 531 408 ; Line: C 127 ; WX 262 ; N ; B 64 506 246 730 ; I see there's no character in the last line. Isn't that interesting! Rich |
|
From: Benjamin R. <ben...@ou...> - 2011-10-17 22:34:09
|
On Monday, October 17, 2011, Rich Shepard <rsh...@ap...> wrote: > On Mon, 17 Oct 2011, Benjamin Root wrote: > >> On line 166, I want you to put "print 'Line:', line". Then, rerun your >> program and report back what the output of that print statement. > > Ben, > > Sorry I mis-understood your request. > > I redirected the output to a file 'error.log' and it contains 104,777 > lines from the 'print line' command. I can gzip it and send it to you off > the list but it's 5.5M in size. > > When I grep for Underline in error.log it's not found. That seems to be > the unknown keyword. > > How would you like me to proceed? > > Thanks, > > Rich > I only need the last line printed by that print statement. I want to see how the parsing failed. Ben |
|
From: Rich S. <rsh...@ap...> - 2011-10-17 20:27:34
|
On Mon, 17 Oct 2011, Benjamin Root wrote: > On line 166, I want you to put "print 'Line:', line". Then, rerun your > program and report back what the output of that print statement. Ben, Sorry I mis-understood your request. I redirected the output to a file 'error.log' and it contains 104,777 lines from the 'print line' command. I can gzip it and send it to you off the list but it's 5.5M in size. When I grep for Underline in error.log it's not found. That seems to be the unknown keyword. How would you like me to proceed? Thanks, Rich |
|
From: tinux <hof...@gm...> - 2011-10-17 19:57:28
|
I have around 100 python files, that each create one figure using matplotlib. Since I want to use all CPU cores, I basically did "for filename in files: execfile(filename)" using a python script. However, this does not produce the same output as running each file separately (for instance axes, figure size are sometime wrong). I _think_ I narrowed it down to this: In all files I need to do "matplotlib.rcParams(update)". I guess that this influences the matplotlib rc parameters and thus somehow values from some figures are used for others. So, my question is, how can I do something like "matplotlib.rcParams(update)" so that it does not influence other scripts that are run in parallel using 'execfile'? Or, how do I set rc parameters for one specific script? BTW, I tried 'pp' and 'multiprocessing', same problem with both. Any help is greatly appreciated! Cheers, Martin -- View this message in context: http://old.nabble.com/matplotlib.rcParams%28update%29-and-parallel-python-tp32669484p32669484.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Benjamin R. <ben...@ou...> - 2011-10-17 18:27:29
|
On Monday, October 17, 2011, Rich Shepard <rsh...@ap...> wrote:
> On Mon, 17 Oct 2011, Benjamin Root wrote:
>
>> In the afm.py file, a before line 167, can you print the value of the
>> "line" variable and tell us what it is?
>
> Ben,
>
> Here are lines 158-167:
>
> while 1:
> line = fh.readline()
> if not line: break
> line = line.rstrip()
> if line.startswith('EndCharMetrics'): return ascii_d, name_d
> vals = line.split(';')[:4]
> if len(vals) !=4 : raise RuntimeError('Bad char metrics line: %s'
> num = _to_int(vals[0].split()[1])
> wx = _to_float(vals[1].split()[1])
> name = vals[2].split()[1]
>
> Thanks,
>
> Rich
>
Rich,
On line 166, I want you to put "print 'Line:', line". Then, rerun your
program and report back what the output of that print statement.
Ben Root
|
|
From: Rich S. <rsh...@ap...> - 2011-10-17 18:19:16
|
On Mon, 17 Oct 2011, Benjamin Root wrote:
> In the afm.py file, a before line 167, can you print the value of the
> "line" variable and tell us what it is?
Ben,
Here are lines 158-167:
while 1:
line = fh.readline()
if not line: break
line = line.rstrip()
if line.startswith('EndCharMetrics'): return ascii_d, name_d
vals = line.split(';')[:4]
if len(vals) !=4 : raise RuntimeError('Bad char metrics line: %s'
num = _to_int(vals[0].split()[1])
wx = _to_float(vals[1].split()[1])
name = vals[2].split()[1]
Thanks,
Rich
|
|
From: Benjamin R. <ben...@ou...> - 2011-10-17 18:13:12
|
On Mon, Oct 17, 2011 at 12:57 PM, Rich Shepard <rsh...@ap...>wrote: > After a long hiatus I'm again working on an application and just upgraded > matplotlib from 0.98.5.2 to 0.99.1.2. However, there's an error on start up > that I need your help in resolving. > > There are many dozens of lines containing: > > Found an unknown keyword in AFM header (was Underline) > > The traceback (in its entirety) shows: > > Traceback (most recent call last): > File "./eikos.py", line 6, in <module> > from modelPage import modModel > File "/home/rshepard/development/trunk/modelPage.py", line 8, in <module> > from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as > FigureCanvas > File > "/usr/lib/python2.6/site-packages/matplotlib/backends/backend_wxagg.py", > line 20, in <module> > from matplotlib.figure import Figure > File "/usr/lib/python2.6/site-packages/matplotlib/figure.py", line 18, in > <module> > from axes import Axes, SubplotBase, subplot_class_factory > File "/usr/lib/python2.6/site-packages/matplotlib/axes.py", line 12, in > <module> > import matplotlib.axis as maxis > File "/usr/lib/python2.6/site-packages/matplotlib/axis.py", line 10, in > <module> > import matplotlib.font_manager as font_manager > File "/usr/lib/python2.6/site-packages/matplotlib/font_manager.py", line > 1301, in <module> > _rebuild() > File "/usr/lib/python2.6/site-packages/matplotlib/font_manager.py", line > 1292, in _rebuild > fontManager = FontManager() > File "/usr/lib/python2.6/site-packages/matplotlib/font_manager.py", line > 1010, in __init__ > self.afmlist = createFontList(self.afmfiles, fontext='afm') > File "/usr/lib/python2.6/site-packages/matplotlib/font_manager.py", line > 578, in createFontList > font = afm.AFM(fh) > File "/usr/lib/python2.6/site-packages/matplotlib/afm.py", line 295, in > __init__ > parse_afm(fh) > File "/usr/lib/python2.6/site-packages/matplotlib/afm.py", line 283, in > parse_afm > dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh) > File "/usr/lib/python2.6/site-packages/matplotlib/afm.py", line 167, in > _parse_char_metrics > name = vals[2].split()[1] > IndexError: list index out of range > > Please tell me what I need to do to resolve this error. > > Rich > > Rich, In the afm.py file, a before line 167, can you print the value of the "line" variable and tell us what it is? Ben Root |
|
From: Rich S. <rsh...@ap...> - 2011-10-17 17:58:00
|
After a long hiatus I'm again working on an application and just upgraded
matplotlib from 0.98.5.2 to 0.99.1.2. However, there's an error on start up
that I need your help in resolving.
There are many dozens of lines containing:
Found an unknown keyword in AFM header (was Underline)
The traceback (in its entirety) shows:
Traceback (most recent call last):
File "./eikos.py", line 6, in <module>
from modelPage import modModel
File "/home/rshepard/development/trunk/modelPage.py", line 8, in <module>
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as
FigureCanvas
File
"/usr/lib/python2.6/site-packages/matplotlib/backends/backend_wxagg.py",
line 20, in <module>
from matplotlib.figure import Figure
File "/usr/lib/python2.6/site-packages/matplotlib/figure.py", line 18, in
<module>
from axes import Axes, SubplotBase, subplot_class_factory
File "/usr/lib/python2.6/site-packages/matplotlib/axes.py", line 12, in
<module>
import matplotlib.axis as maxis
File "/usr/lib/python2.6/site-packages/matplotlib/axis.py", line 10, in
<module>
import matplotlib.font_manager as font_manager
File "/usr/lib/python2.6/site-packages/matplotlib/font_manager.py", line
1301, in <module>
_rebuild()
File "/usr/lib/python2.6/site-packages/matplotlib/font_manager.py", line
1292, in _rebuild
fontManager = FontManager()
File "/usr/lib/python2.6/site-packages/matplotlib/font_manager.py", line
1010, in __init__
self.afmlist = createFontList(self.afmfiles, fontext='afm')
File "/usr/lib/python2.6/site-packages/matplotlib/font_manager.py", line
578, in createFontList
font = afm.AFM(fh)
File "/usr/lib/python2.6/site-packages/matplotlib/afm.py", line 295, in
__init__
parse_afm(fh)
File "/usr/lib/python2.6/site-packages/matplotlib/afm.py", line 283, in
parse_afm
dcmetrics_ascii, dcmetrics_name = _parse_char_metrics(fh)
File "/usr/lib/python2.6/site-packages/matplotlib/afm.py", line 167, in
_parse_char_metrics
name = vals[2].split()[1]
IndexError: list index out of range
Please tell me what I need to do to resolve this error.
Rich
|
|
From: Piter_ <x....@gm...> - 2011-10-17 17:02:49
|
Hi all I want to draw an two headed arrow between two points. But I get a line. What I am doing wrong? I actually try to plot an image similar to this one: http://upload.wikimedia.org/wikipedia/commons/a/a3/Parameters_of_the_Marcus_Equation.JPG may be I can use an annotate function for this. Thanks for help. Petro. ######## import pylab from scipy import optimize import numpy x1=numpy.arange(-4000,1000,0.1) x2=numpy.arange(-1000,4000,0.1) y1=100*numpy.square(x1+1500) y2=100*numpy.square(x2-1500)-0.1e9 pylab.figure() pylab.plot(x1,y1,x2,y2) pylab.grid("True") pylab.arrow(-3000,0,0,-100000000,width=1) pylab.xlim(-5000,5000) pylab.ylim(-2e8,7e8) pylab.show() ###########x |
|
From: C M <cmp...@gm...> - 2011-10-17 03:51:08
|
> So, it seems that the issue is platform-dependent. OK. > As for the error message, it seems that the subplot_params values > (left, right, top, bottom, etc) calculated by the "tight_layout" > routine is somehow corrupted. > Why this happens is hard to track down unless I can reproduce the error. > And I hope any other windows developer out there can take a look at this issue. > > Meanwhile, can you play a little bit more with your script? > > 1) check the size of the figure (print self.figure.get_size_inches()) > before a tight_layout is called. What it prints is this: [ 8. 6.] > 2) see if calling the draw method (self.canvas.draw()) before the > tight_layout helps. It didn't help. > Also, please open a git issue on this so that others can take a look. Sure. It's issue #532. (I tried to include the sample script but the indenting got removed from the issue window, not sure how to fix that). Thanks, Che |
|
From: Jae-Joon L. <lee...@gm...> - 2011-10-17 01:14:17
|
On Mon, Oct 17, 2011 at 1:03 AM, C M <cmp...@gm...> wrote: > - Error if I call self.panel.Layout() before I call tight_layout(). In my system, I don't see any error whether ` self.panel.Layout() is in or not. > - If I don't do this, no error, but it still isn't doing a proper tight layout. > Your script DOES work in my system (but I'm using it with wxGTK) and it DOES a proper tight_layout. (However, the figure size never gets smaller than the original figure size so it shows only the part of the figure when the window is smaller than the original figure size). So, it seems that the issue is platform-dependent. As for the error message, it seems that the subplot_params values (left, right, top, bottom, etc) calculated by the "tight_layout" routine is somehow corrupted. Why this happens is hard to track down unless I can reproduce the error. And I hope any other windows developer out there can take a look at this issue. Meanwhile, can you play a little bit more with your script? 1) check the size of the figure (print self.figure.get_size_inches()) before a tight_layout is called. 2) see if calling the draw method (self.canvas.draw()) before the tight_layout helps. Also, please open a git issue on this so that others can take a look. Regards, -JJ |
|
From: C M <cmp...@gm...> - 2011-10-16 16:03:42
|
> In your example code, do you see the error raised only when you
> include the tight_layout call?
Yes. To see this (at least on my platform), you take the example code
and try two things:
1) Comment IN this line: self.panel.Layout(). Run it and you'll get the error.
3) Now comment OUT the tight_layout() call. Run it and you won't get the error.
So you have to Layout() a parent panel (the one the canvas is sitting
on) for this error to occur, but that is a common thing to do in
wxPython when using sizers and shouldn't cause errors. Here is the
traceback:
Traceback (most recent call last):
File "C:\Documents and
Settings\user\Desktop\testing_tight_layout.py", line 35, in <module>
frame = Frame1(None)
File "C:\Documents and
Settings\user\Desktop\testing_tight_layout.py", line 14, in __init__
self.Add_MPL_Plot()
File "C:\Documents and
Settings\user\Desktop\testing_tight_layout.py", line 30, in
Add_MPL_Plot
self.figure.tight_layout()
File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line
1393, in tight_layout
self.subplots_adjust(**kwargs)
File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line
1218, in subplots_adjust
self.subplotpars.update(*args, **kwargs)
File "C:\Python25\Lib\site-packages\matplotlib\figure.py", line 183, in update
raise ValueError('left cannot be >= right')
ValueError: left cannot be >= right
I just don't understand what this means and why it would be thrown.
> Anyhow, your code runs fine in my installment, linux + python 2.7.2 +
> wxgtk 2.8.11.0 + mpl master branch.
> On which platform you're running this?
WinXP, Python 2.5, wxPython 2.8.10.1 (msw-unicode), mpl 1.1.0 as
downloaded from the site three days ago.
When you say the code runs fine, did you try steps (1) and (2) above?
Also, if you just run it without making those changes, does the
tight_layout() work to resize the plot such that it allows the axis
labels to be seen at all times? (it doesn't for me).
So, to summarize:
- Error if I call self.panel.Layout() before I call tight_layout().
- If I don't do this, no error, but it still isn't doing a proper tight layout.
Thanks,
Che
|
|
From: Jae-Joon L. <lee...@gm...> - 2011-10-16 11:18:14
|
On Sun, Oct 16, 2011 at 1:55 PM, C M <cmp...@gm...> wrote: > However, I can't get it to work correct with Figure. I'm either getting > that same error or failure to adjust the Figure's size to accommodate the > axes' labels. I attach a minimal runnable sample that demonstrates these > problems for those that embed in wxPython. > In your example code, do you see the error raised only when you include the tight_layout call? Your comments seem to suggest that the error is raised regardless of the tight_layout call, in which case I doubt if this has anything to do with tight_layout. Anyhow, your code runs fine in my installment, linux + python 2.7.2 + wxgtk 2.8.11.0 + mpl master branch. On which platform you're running this? Regards, -JJ |
|
From: John H. <jd...@gm...> - 2011-10-15 15:56:59
|
On Sat, Oct 15, 2011 at 10:39 AM, <jos...@gm...> wrote: > I'm building plots in stages using several different functions. Since > the figure contains all information, I don't hand handles to > individual elements around. > > What's the best way to check for a specific plot element? using > isinstance, or are there specific attributes that could be checked? Checkout out Artist.findobj http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.artist.Artist.findobj Artist is the base class for everything in a matplotlib figure, the Figure, Axes, Axis, Text, Line2D, Polygon, etc, all derive from Artist, so you can call this method on any mpl object to recursively search for objects of a given type. By recursive, I mean search the objects children, their children, etc. See also http://matplotlib.sourceforge.net/users/artists.html for more info on the artist hierarchy. But for your specific example, each axes has an `images` attribute, which is a list of images it contains (this is detailed in the artist tutorial linked above, so you could simplify your code with something like: images = np.concatenate([ax.images for ax in fig.axes]) JDH |
|
From: <jos...@gm...> - 2011-10-15 15:39:36
|
I'm building plots in stages using several different functions. Since the figure contains all information, I don't hand handles to individual elements around. What's the best way to check for a specific plot element? using isinstance, or are there specific attributes that could be checked? For example, I want to add a colorbar to the figure corresponding to the first axis.imshow: >>> images = [c for ax in f.axes for c in ax.get_children() if isinstance(c, mpl.image.AxesImage)] >>> images [<matplotlib.image.AxesImage object at 0x08C0CAD0>] >>> f.colorbar(images[0]) <matplotlib.colorbar.Colorbar instance at 0x08E033F0> >>> f <matplotlib.figure.Figure object at 0x08B614D0> example using recipe http://matplotlib.sourceforge.net/examples/pylab_examples/subplots_adjust.html https://lh5.googleusercontent.com/-rpw4NHbXvxM/TpmnumYNcRI/AAAAAAAAAK0/5zLnnUPjg0A/corrmatrixgrid.png Thanks, Josef |
|
From: Chao Y. <cha...@gm...> - 2011-10-15 14:36:33
|
cool. it's done!! Thanks!!! Chao 2011/10/15 Tony Yu <ts...@gm...> > > > On Sat, Oct 15, 2011 at 8:55 AM, Chao YUE <cha...@gm...> wrote: > >> Dear all, >> >> how can I make a scatter plot without edgecolor? >> >> import matplotlib.pyplot as plt >> In [110]: plt.scatter(np.arange(10),np.arange(10,20),edgecolor=None) >> Out[110]: <matplotlib.collections.CircleCollection object at 0x5cf16d0> >> >> in this case I can use edgecolor='w' to solve it, but when points overlap, >> this does not work anymore. >> Any help will be appreciated. Thanks. >> > > Hi Chao, > > I think what you want is 'none': > > plt.scatter(np.arange(10),np.arange(10,20), color='y',edgecolor='none') > > It's confusing, but None is used to let matplotlib auto-select the color, > while 'none' is used to turn off edge coloring. > > Best, > -Tony > -- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************ |
|
From: Jae-Joon L. <lee...@gm...> - 2011-10-15 14:15:59
|
Figure.tight_layout() is a correct way. Do you see that error only when you use Figure.tight_plot (and not when you use plt.tight_layout)? What happen you try the script below. import matplotlib.pyplot as plt fig = plt.figure(1)ax = fig.add_subplot(111)fig.tight_layout() Regards, -JJ On Sat, Oct 15, 2011 at 9:13 AM, C M <cmp...@gm...> wrote: > Just trying out the latest mpl 1.1.0 and the tight_layout() method. I saw > the guide written about it, but am a unsure how to use this when using the > OO approach to using Matplotlib. > > When using pyplot, the method is: plt.tight_layout(). When using the OO > form of mpl, is it: figure.tight_layout() ? > > I assume it is, because I tried this and it didn't give me a name error, but > I did get an error: ValueError: left cannot be >= right. > > What am I doing wrong? > > Thanks, > Che > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2d-oct > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Tony Yu <ts...@gm...> - 2011-10-15 13:39:30
|
On Sat, Oct 15, 2011 at 8:55 AM, Chao YUE <cha...@gm...> wrote: > Dear all, > > how can I make a scatter plot without edgecolor? > > import matplotlib.pyplot as plt > In [110]: plt.scatter(np.arange(10),np.arange(10,20),edgecolor=None) > Out[110]: <matplotlib.collections.CircleCollection object at 0x5cf16d0> > > in this case I can use edgecolor='w' to solve it, but when points overlap, > this does not work anymore. > Any help will be appreciated. Thanks. > Hi Chao, I think what you want is 'none': plt.scatter(np.arange(10),np.arange(10,20), color='y',edgecolor='none') It's confusing, but None is used to let matplotlib auto-select the color, while 'none' is used to turn off edge coloring. Best, -Tony |
|
From: Durrieu Jean-L. <jea...@ep...> - 2011-10-15 13:20:46
|
Hi Chao! On Oct 15, 2011, at 2:55 PM, Chao YUE wrote: > import matplotlib.pyplot as plt > In [110]: plt.scatter(np.arange(10),np.arange(10,20),edgecolor=None) > Out[110]: <matplotlib.collections.CircleCollection object at 0x5cf16d0> > > in this case I can use edgecolor='w' to solve it, but when points overlap, this does not work anymore. > Any help will be appreciated. Thanks. For scatter plots, I usually use: plt.plot(x,y,'.') You can manipulate a bit the marker, markersize, style and alpha parameters (nice when there are really too many points overlapping, to get an idea of the "distribution"). In your ipython, type plot? to get all the available options. Cheers, jean-louis > > Chao > -- > *********************************************************************************** > Chao YUE > Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) > UMR 1572 CEA-CNRS-UVSQ > Batiment 712 - Pe 119 > 91191 GIF Sur YVETTE Cedex > Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 > ************************************************************************************ > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2d-oct_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Chao Y. <cha...@gm...> - 2011-10-15 12:55:16
|
Dear all, how can I make a scatter plot without edgecolor? import matplotlib.pyplot as plt In [110]: plt.scatter(np.arange(10),np.arange(10,20),edgecolor=None) Out[110]: <matplotlib.collections.CircleCollection object at 0x5cf16d0> in this case I can use edgecolor='w' to solve it, but when points overlap, this does not work anymore. Any help will be appreciated. Thanks. Chao -- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************ |
|
From: Benjamin R. <ben...@ou...> - 2011-10-15 00:50:14
|
On Friday, October 14, 2011, jopeto <g_n...@ho...> wrote: > > Hello, > > I have a question regarding setting a custom axis range. Here's a basic > example: > > import matplotlib.pyplot as plt > > fig = plt.figure() > ax = fig.add_subplot(1,1,1) > ax.plot([1,2,3]) > ax.axis([xmin,xmax,ymin,ymax]) > plt.show() > > Now the question that I'm having is the following. The way I understand it > now, I either have to live with the default axis ranges which matplotlib > gives me, or I need to change all four values xmin, xmax, ymin, ymax using > the ax.axis command. Say that I'm happy with xmin, ymin and ymax, and I only > want to set xmax to a value slightly larger than the default. Is there a way > to specify just that and to be able to keep the other three? The command > which I'm looking for would be something like: > > ax.axis([keep default, xmax, keep default, keep default]) > > If someone has a suggestion, I would be very grateful. Use ax.set_xlim() and it's y-axis equivalent. You can even use kwargs to those functions to manually set only one of the two limits. Ben Root |
|
From: C M <cmp...@gm...> - 2011-10-15 00:13:32
|
Just trying out the latest mpl 1.1.0 and the tight_layout() method. I saw the guide written about it, but am a unsure how to use this when using the OO approach to using Matplotlib. When using pyplot, the method is: plt.tight_layout(). When using the OO form of mpl, is it: figure.tight_layout() ? I assume it is, because I tried this and it didn't give me a name error, but I did get an error: ValueError: left cannot be >= right. What am I doing wrong? Thanks, Che |
|
From: jopeto <g_n...@ho...> - 2011-10-14 22:46:27
|
Hello, I have a question regarding setting a custom axis range. Here's a basic example: import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(1,1,1) ax.plot([1,2,3]) ax.axis([xmin,xmax,ymin,ymax]) plt.show() Now the question that I'm having is the following. The way I understand it now, I either have to live with the default axis ranges which matplotlib gives me, or I need to change all four values xmin, xmax, ymin, ymax using the ax.axis command. Say that I'm happy with xmin, ymin and ymax, and I only want to set xmax to a value slightly larger than the default. Is there a way to specify just that and to be able to keep the other three? The command which I'm looking for would be something like: ax.axis([keep default, xmax, keep default, keep default]) If someone has a suggestion, I would be very grateful. Thanks in advance! -- View this message in context: http://old.nabble.com/custom-axis-range-tp32655869p32655869.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Benjamin R. <ben...@ou...> - 2011-10-14 17:28:57
|
On Fri, Oct 14, 2011 at 12:24 PM, Chao YUE <cha...@gm...> wrote:
> Dear all,
>
> I am trying to plot data on a 1:1 ratio plot to compare the data.
> I can set the x and y aixs to have the same limits. but how can I set them
> to have the same distance between ticks in the graph?
> Thanks a lot,
>
> chao
>
>
Set the aspect ratio to be equal:
ax.plot(x, y)
ax.set_aspect('equal')
I hope that helps!
Ben Root
|