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
(5) |
2
(24) |
3
(2) |
|
4
|
5
(4) |
6
(1) |
7
(22) |
8
(9) |
9
(23) |
10
(6) |
|
11
|
12
(7) |
13
(17) |
14
(12) |
15
(10) |
16
(22) |
17
(11) |
|
18
(6) |
19
(11) |
20
(13) |
21
(10) |
22
(7) |
23
(7) |
24
(5) |
|
25
(3) |
26
(20) |
27
(17) |
28
(25) |
29
(16) |
30
(17) |
31
(8) |
|
From: Pierre GM <pgm...@gm...> - 2007-03-07 22:54:00
|
The problem was a use of (Numeric) MA with numpy. Pointing towards matplotlib.numerix.ma solved the issue. |
|
From: Zack 2. <za...@gm...> - 2007-03-07 21:40:00
|
Matplotlib 0.90
Found the bug in axes3d.py
lines 513, 514
please change:
for rs in nx.arange(0,rows,rstride):
for cs in nx.arange(0,cols,cstride):
to:
for rs in nx.arange(0,rows-1,rstride):
for cs in nx.arange(0,cols-1,cstride):
Otherwise I'm getting error: "IndexError: index out of bounds"
Thanks
|
|
From: Jeff P. <jef...@ya...> - 2007-03-07 21:16:16
|
Hello, I'm using the rcParams to set the plot settings. It all works great! ... except I haven't been able to set the axes line color or the x tick line color. Is there something like: Matplotlib.rcParams['xtick.linecolor] = 'w' Thanks, Jeff --------------------------------- Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. |
|
From: Darren D. <dd...@co...> - 2007-03-07 20:45:45
|
On Wednesday 07 March 2007 03:13:13 pm Emin.shopper Martinian.shopper wrote: > Dear Experts, > > I'm having a little problem with labels in a bar chart. When I do something > like > > labels = ['one','two','threeeeeeeeeee'] > pylab.bar(range(len(labels)),range(len(labels))) > pylab.xticks(range(len(labels)),labels,rotation='vertical') > > the long label isn't completely visible in the figure. How do I tell pylab > to arrange things so that all the labels are visible? > > Thanks, > -Emin Try making your figure window larger (using figure(figsize=(x,y)) or leaving more room between your axes and you figure boundary (either using the subplots_adjust gui button or axes([x_left, y_bottom, x_right, y_top])), or a combination of both. Darren |
|
From: <jp...@po...> - 2007-03-07 20:39:33
|
Thanks for quick response! Sample script: -------------------------------------------------------------- #! /usr/local/bin/python from matplotlib.backends.backend_agg import FigureCanvasAgg from matplotlib.figure import Figure, SubplotParams from MA import * fig = Figure() ax = fig.add_axes([0.1, 0.15, 0.8, 0.7]) dates = [732312.0, 732343.0, 732371.0] data = [1., -9999., 5.] data_masked = masked_values(data, -9999.) ax.plot_date(dates, data_masked) # END SCRIPT -------------------------------------------------------------- The machine the script worked on has: python 2.4, numarray-1.3.3, Numeric-23.8, matplotlib-0.83.2 The machine it didn't work has: python 2.4.4, numpy-1.0.1, Numeric-24.2, matplotlib-0.90.0 Thanks again. Jianfu Quoting Pierre GM <pgm...@gm...>: > On Wednesday 07 March 2007 14:43:45 jp...@po... wrote: > > Anyone knows which of my package (MA, numpy, ...) might be causing the > > conflict? I could go back to the older version (on another machine), but I > > really like it to work in the newer version. Any inputs would be > > appreciated. > > Hello, could you provide us with: > - the numpy version > - the matplotlib version > - an example of code > > That'd be easier for us to try and help you. > Thx a lot in advance > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: johann cohen-t. <joh...@gm...> - 2007-03-07 20:27:27
|
Actually, I have other problems : I cannot save in many formats. The bmp is
deemed usueless by gimp, and ps and eps save options gives the following
error message (I am using matplotlib-0.90 on python/ipython 2.4) :
In [1]: show()
---------------------------------------------------------------------------
exceptions.ValueError Traceback (most recent
call last)
/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtk.py in
save_figu re(self, button)
630 fname = self.fileselect.get_filename_from_user()
631 if fname:
--> 632 self.canvas.print_figure(fname)
633
634 def configure_subplots(self, button):
/usr/lib/python2.4/site-packages/matplotlib/backends/backend_gtkagg.py in
print_ figure(self, filename, dpi, facecolor, edgecolor, orientation,
**kwargs)
112 try:
113 agg.print_figure(filename, dpi, facecolor,
edgecolor,
--> 114 orientation, **kwargs)
115 except IOError, msg:
116 error_msg_gtk('Failed to save\nError message:
%s'%(msg,) , self)
/usr/lib/python2.4/site-packages/matplotlib/backends/backend_agg.py in
print_fig ure(self, filename, dpi, facecolor, edgecolor, orientation,
**kwargs)
486 ps = self.switch_backends(FigureCanvasPS)
487 ps.print_figure(filename, dpi, facecolor, edgecolor,
--> 488 orientation, **kwargs)
489 elif ext.find('pdf')>=0:
490 from backend_pdf import FigureCanvasPdf
/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py in
print_figu re(self, outfile, dpi, facecolor, edgecolor, orientation,
papertype)
1073 self._pswriter = StringIO()
1074 renderer = RendererPS(width, height, self._pswriter,
dpi=dpi )
-> 1075 self.figure.draw(renderer)
1076
1077 self.figure.set_facecolor(origfacecolor)
/usr/lib/python2.4/site-packages/matplotlib/figure.py in draw(self,
renderer)
567
568 # render the axes
--> 569 for a in self.axes: a.draw(renderer)
570
571 # render the figure text
/usr/lib/python2.4/site-packages/matplotlib/axes.py in draw(self, renderer,
infr ame)
1153
1154 for zorder, i, a in dsu:
-> 1155 a.draw(renderer)
1156
1157 self.transData.thaw() # release the lazy objects
/usr/lib/python2.4/site-packages/matplotlib/axis.py in draw(self, renderer,
*arg s, **kwargs)
623 # the actual bbox
624 self._update_label_position(ticklabelBoxes, ticklabelBoxes2)
--> 625 self.label.draw(renderer)
626
627 self._update_offset_text_position(ticklabelBoxes,
ticklabelBoxes 2)
/usr/lib/python2.4/site-packages/matplotlib/text.py in draw(self, renderer)
398
399 return
--> 400 bbox, info = self._get_layout(renderer)
401 trans = self.get_transform()
402 if ismath=='TeX':
/usr/lib/python2.4/site-packages/matplotlib/text.py in _get_layout(self,
rendere r)
243 heightt += 3 # 3 pixel pad
244 for line in lines:
--> 245 w,h = renderer.get_text_width_height(
246 line, self._fontproperties, ismath=self.is_math_text
())
247
/usr/lib/python2.4/site-packages/matplotlib/backends/backend_ps.py in
get_text_w idth_height(self, s, prop, ismath)
264
265 if ismath:
--> 266 width, height, pswriter = math_parse_s_ps(
267 s, 72, prop.get_size_in_points())
268 return width, height
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in __call__(self, s,
dpi , fontsize, angle)
1581 expression.parseString( s )
1582
-> 1583 handler.expr.set_size_info(fontsize, dpi)
1584
1585 # set the origin once to allow w, h compution
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1197
1198 def set_size_info(self, fontsize, dpi):
-> 1199 self.elements[0].set_size_info(self._scale*fontsize, dpi)
1200 Element.set_size_info(self, fontsize, dpi)
1201 #print 'set size'
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1108
1109 def set_size_info(self, fontsize, dpi):
-> 1110 Element.set_size_info(self, fontsize, dpi)
1111 self.metrics = Element.fonts.get_metrics(
1112 self.font, self.sym, self.fontsize, dpi)
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1021 element.set_size_info(0.7*self.fontsize, dpi)
1022 else:
-> 1023 element.set_size_info(self.fontsize, dpi)
1024
1025 def pady(self):
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1108
1109 def set_size_info(self, fontsize, dpi):
-> 1110 Element.set_size_info(self, fontsize, dpi)
1111 self.metrics = Element.fonts.get_metrics(
1112 self.font, self.sym, self.fontsize, dpi)
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1021 element.set_size_info(0.7*self.fontsize, dpi)
1022 else:
-> 1023 element.set_size_info(self.fontsize, dpi)
1024
1025 def pady(self):
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1108
1109 def set_size_info(self, fontsize, dpi):
-> 1110 Element.set_size_info(self, fontsize, dpi)
1111 self.metrics = Element.fonts.get_metrics(
1112 self.font, self.sym, self.fontsize, dpi)
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1021 element.set_size_info(0.7*self.fontsize, dpi)
1022 else:
-> 1023 element.set_size_info(self.fontsize, dpi)
1024
1025 def pady(self):
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1108
1109 def set_size_info(self, fontsize, dpi):
-> 1110 Element.set_size_info(self, fontsize, dpi)
1111 self.metrics = Element.fonts.get_metrics(
1112 self.font, self.sym, self.fontsize, dpi)
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1021 element.set_size_info(0.7*self.fontsize, dpi)
1022 else:
-> 1023 element.set_size_info(self.fontsize, dpi)
1024
1025 def pady(self):
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1108
1109 def set_size_info(self, fontsize, dpi):
-> 1110 Element.set_size_info(self, fontsize, dpi)
1111 self.metrics = Element.fonts.get_metrics(
1112 self.font, self.sym, self.fontsize, dpi)
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1021 element.set_size_info(0.7*self.fontsize, dpi)
1022 else:
-> 1023 element.set_size_info(self.fontsize, dpi)
1024
1025 def pady(self):
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1197
1198 def set_size_info(self, fontsize, dpi):
-> 1199 self.elements[0].set_size_info(self._scale*fontsize, dpi)
1200 Element.set_size_info(self, fontsize, dpi)
1201 #print 'set size'
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1108
1109 def set_size_info(self, fontsize, dpi):
-> 1110 Element.set_size_info(self, fontsize, dpi)
1111 self.metrics = Element.fonts.get_metrics(
1112 self.font, self.sym, self.fontsize, dpi)
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1021 element.set_size_info(0.7*self.fontsize, dpi)
1022 else:
-> 1023 element.set_size_info(self.fontsize, dpi)
1024
1025 def pady(self):
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in
set_size_info(self, f ontsize, dpi)
1109 def set_size_info(self, fontsize, dpi):
1110 Element.set_size_info(self, fontsize, dpi)
-> 1111 self.metrics = Element.fonts.get_metrics(
1112 self.font, self.sym, self.fontsize, dpi)
1113
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in get_metrics(self,
fon t, sym, fontsize, dpi)
799
800 def get_metrics(self, font, sym, fontsize, dpi):
--> 801 basename, metrics, sym, offset = \
802 self._get_info(font, sym, fontsize, dpi)
803 return metrics
/usr/lib/python2.4/site-packages/matplotlib/mathtext.py in _get_info(self,
font, sym, fontsize, dpi)
748 num = 0
749 sym = '.notdef'
--> 750 raise ValueError('unrecognized symbol "%s, %d"' % (sym,
num) )
751 filename = os.path.join(self.basepath, basename) + '.ttf'
752 if filename not in bakoma_fonts:
ValueError: unrecognized symbol ".notdef, 0"
On 3/7/07, johann cohen-tanugi <joh...@gm...> wrote:
>
> Hello,
> I am attaching my python script to this email. It makes three figures, and
> everything is fine (I started with matplotlib a couple of weeks ago and so
> far I love it!),
> but for the way \tilde is dealt with, which seems to be a bug :
> If I do r'$A\tilde{B}$' the tilde is actually on the A !! If instead I do
> (like in the attached script) r'$AB\tilde$' then the tilde is on the B, but
> looks pretty ugly.
> Is there a quick fix? Do I need to choose another font?
>
> thanks for your help,
> Johann
>
>
> ------------------------------
>
>
>
|
|
From: Emin.shopper Martinian.s. <emi...@gm...> - 2007-03-07 20:13:16
|
Dear Experts, I'm having a little problem with labels in a bar chart. When I do something like labels = ['one','two','threeeeeeeeeee'] pylab.bar(range(len(labels)),range(len(labels))) pylab.xticks(range(len(labels)),labels,rotation='vertical') the long label isn't completely visible in the figure. How do I tell pylab to arrange things so that all the labels are visible? Thanks, -Emin |
|
From: Zack 2. <za...@gm...> - 2007-03-07 19:54:59
|
Thanks Mark for the link! Exactly what I need. |
|
From: Pierre GM <pgm...@gm...> - 2007-03-07 19:54:00
|
On Wednesday 07 March 2007 14:43:45 jp...@po... wrote: > Anyone knows which of my package (MA, numpy, ...) might be causing the > conflict? I could go back to the older version (on another machine), but I > really like it to work in the newer version. Any inputs would be > appreciated. Hello, could you provide us with: - the numpy version - the matplotlib version - an example of code That'd be easier for us to try and help you. Thx a lot in advance |
|
From: <jp...@po...> - 2007-03-07 19:43:54
|
Hi,
My plot_dates(x, y) call, while working in python 2.4, failed in python 2.4.4. x
here is dates array and y is a masked array returned by masked_values()from MA
module. After much debugging, I found that problem occurs at ma.asarray(y)
where y is the masked array with the following message:
***ValueError: object __array__ method not producing an array
Anyone knows which of my package (MA, numpy, ...) might be causing the conflict?
I could go back to the older version (on another machine), but I really like it
to work in the newer version. Any inputs would be appreciated.
Regards,
Jianfu Pan
|
|
From: johann cohen-t. <joh...@gm...> - 2007-03-07 19:11:09
|
Hello,
I am attaching my python script to this email. It makes three figures, and
everything is fine (I started with matplotlib a couple of weeks ago and so
far I love it!),
but for the way \tilde is dealt with, which seems to be a bug :
If I do r'$A\tilde{B}$' the tilde is actually on the A !! If instead I do
(like in the attached script) r'$AB\tilde$' then the tilde is on the B, but
looks pretty ugly.
Is there a quick fix? Do I need to choose another font?
thanks for your help,
Johann
------------------------------
|
|
From: <kc1...@ya...> - 2007-03-07 18:53:10
|
Thanks, John. That works perfectly. Now I understand better what the tran= sform parameter is.=0A=0ARegards,=0A=0A> -----Original Message-----=0A> Fro= m: John Hunter [mailto:jd...@gm...] =0A> Sent: Wednesday, March 07, 2= 007 10:12 AM=0A> To: kc1...@ya...=0A> Cc: matplotlib-use= rs...@li...=0A> Subject: Re: [Matplotlib-users] How to draw a = straight line?=0A> =0A> =0A> On 3/7/07, kc1...@ya... =0A= > <kc1...@ya...> wrote:=0A> =0A> > Upon working with thi= s a little further, I discover that it =0A> works only =0A> > in full-view = screen mode. May be that's because xy is in =0A> pixel mode =0A> > then? = When I save it to a png file and then view it, the lines are =0A> > wrong.= =0A> =0A> The default coords in the example I posted are in pixels -- =0A> = when you save, you are probably using a different DPI (this =0A> is configu= rable) and so the lines have slightly different =0A> positions. You can us= e relative coords with the =0A> "transFigure" transform=0A> =0A> =0A> from = matplotlib.lines import Line2D=0A> from pylab import figure, show, nx=0A> = =0A> fig =3D figure()=0A> line =3D Line2D([0.1,0.2,0.3,0.4,0.5], [0.1,0.4, = 0.35, 0.2, 0.5],=0A> linewidth=3D4, color=3D'green', transfor= m=3Dfig.transFigure)=0A> fig.lines.append(line)=0A> show()=0A> =0A =0A--=0A= John Henry=0A=0A |
|
From: John H. <jd...@gm...> - 2007-03-07 18:11:38
|
On 3/7/07, kc1...@ya...
<kc1...@ya...> wrote:
> Upon working with this a little further, I discover that it works only in full-view screen mode. May be that's because xy is in pixel mode then? When I save it to a png file and then view it, the lines are wrong.
The default coords in the example I posted are in pixels -- when you
save, you are probably using a different DPI (this is configurable)
and so the lines have slightly different positions. You can use
relative coords with the "transFigure" transform
from matplotlib.lines import Line2D
from pylab import figure, show, nx
fig = figure()
line = Line2D([0.1,0.2,0.3,0.4,0.5], [0.1,0.4, 0.35, 0.2, 0.5],
linewidth=4, color='green', transform=fig.transFigure)
fig.lines.append(line)
show()
|
|
From: <kc1...@ya...> - 2007-03-07 17:59:58
|
Upon working with this a little further, I discover that it works only in f= ull-view screen mode. May be that's because xy is in pixel mode then? Whe= n I save it to a png file and then view it, the lines are wrong.=0A =0A--= =0AJohn Henry=0A=0A----- Original Message ----=0AFrom: "kc106_2005-matplotl= ib...@ya..." <kc1...@ya...>=0ATo: matplotlib-users@list= s.sourceforge.net=0ASent: Wednesday, March 7, 2007 9:40:45 AM=0ASubject: Re= : [Matplotlib-users] How to draw a straight line?=0A=0AThanks for the answe= r, John and Jouni.=0A=0AOkay, Line2D works. However, it appears to work in= point (or is it pixels?) only. It doesn't accept xycoords=3D"figure fract= ion" as an option. How can I specify xy as a fraction of the figure size?= =0A=0AI read the transform cookbook cited by Jouni. I am afraid I am lost = what that does....=0A=0ARegards,=0A=0A> -----Original Message-----=0A> From= : mat...@li... =0A> [mailto:matplotlib-us= ers...@li...] On =0A> Behalf Of John Hunter=0A> Sent: = Wednesday, March 07, 2007 6:48 AM=0A> To: mat...@li...= e.net=0A> Subject: Re: [Matplotlib-users] How to draw a straight line?=0A> = =0A> =0A> On 3/6/07, Jouni K. Sepp=E4nen <jk...@ik...> wrote:=0A> > kc106_20= 05-...@ya... writes:=0A> > > How do I draw a line going from poi= nt A to point B on a =0A> figure (not=0A> =0A> It probably makes more sense= not to use Axes.plot at all, =0A> since the line is not associated with an= Axes=0A> =0A> from matplotlib.lines import Line2D=0A> from pylab import fi= gure, show, nx=0A> =0A> fig =3D figure()=0A> line =3D Line2D([100,200,300,4= 00,500], [100,400, 350, 200, 500],=0A> linewidth=3D4, color= =3D'green')=0A> fig.lines.append(line)=0A> show()=0A> =0A> =0A> But this fe= ature isn't used very much, and one thing that we =0A> are not currently su= pporting (but should) is the zorder for =0A> Artists in the Figure. So if = you have an Axes in your plot =0A> and you want the line to go over it, you= 'll need to do =0A> something like Jouni suggested so the line will be draw= n =0A> above the Axes.=0A> =0A> -------------------------------------------= -------------------=0A> -----------=0A> Take Surveys. Earn Cash. Influence = the Future of IT=0A> Join SourceForge.net's Techsay panel and you'll get th= e =0A> chance to share your opinions on IT & business topics through =0A> b= rief surveys-and earn cash =0A> http://www.techsay.com/default.php?page=3Dj= oin.php&p=3Dsourceforge=0A&CID=3DDEVDEV=0A_________________________________= ______________=0AMatplotlib-users mailing list Mat...@li...= eforge.net=0Ahttps://lists.sourceforge.net/lists/listinfo/matplotlib-users= =0A=0A =0A--=0AJohn Henry=0A=0A=0A=0A=0A |
|
From: <kc1...@ya...> - 2007-03-07 17:40:54
|
Thanks for the answer, John and Jouni.=0A=0AOkay, Line2D works. However, i= t appears to work in point (or is it pixels?) only. It doesn't accept xyco= ords=3D"figure fraction" as an option. How can I specify xy as a fraction = of the figure size?=0A=0AI read the transform cookbook cited by Jouni. I a= m afraid I am lost what that does....=0A=0ARegards,=0A=0A> -----Original Me= ssage-----=0A> From: mat...@li... =0A> [m= ailto:mat...@li...] On =0A> Behalf Of Joh= n Hunter=0A> Sent: Wednesday, March 07, 2007 6:48 AM=0A> To: matplotlib-use= rs...@li...=0A> Subject: Re: [Matplotlib-users] How to draw a = straight line?=0A> =0A> =0A> On 3/6/07, Jouni K. Sepp=E4nen <jk...@ik...> wr= ote:=0A> > kc1...@ya... writes:=0A> > > How do I draw a = line going from point A to point B on a =0A> figure (not=0A> =0A> It probab= ly makes more sense not to use Axes.plot at all, =0A> since the line is not= associated with an Axes=0A> =0A> from matplotlib.lines import Line2D=0A> f= rom pylab import figure, show, nx=0A> =0A> fig =3D figure()=0A> line =3D Li= ne2D([100,200,300,400,500], [100,400, 350, 200, 500],=0A> lin= ewidth=3D4, color=3D'green')=0A> fig.lines.append(line)=0A> show()=0A> =0A>= =0A> But this feature isn't used very much, and one thing that we =0A> are= not currently supporting (but should) is the zorder for =0A> Artists in th= e Figure. So if you have an Axes in your plot =0A> and you want the line t= o go over it, you'll need to do =0A> something like Jouni suggested so the = line will be drawn =0A> above the Axes.=0A> =0A> --------------------------= ------------------------------------=0A> -----------=0A> Take Surveys. Earn= Cash. Influence the Future of IT=0A> Join SourceForge.net's Techsay panel = and you'll get the =0A> chance to share your opinions on IT & business topi= cs through =0A> brief surveys-and earn cash =0A> http://www.techsay.com/def= ault.php?page=3Djoin.php&p=3Dsourceforge=0A&CID=3DDEVDEV=0A________________= _______________________________=0AMatplotlib-users mailing list Matplotlib-= us...@li...=0Ahttps://lists.sourceforge.net/lists/listinfo/= matplotlib-users=0A=0A =0A--=0AJohn Henry=0A=0A |
|
From: Eric F. <ef...@ha...> - 2007-03-07 17:22:29
|
John Pye wrote:
> Hi all
>
> I have got some funny behaviour here that looks like a bug with the
> spy() function. Using the latest python-matplotlib 0.87.5 package on
> Ubuntu 6.10, I try:
>
> $ ipython -pylab
> from scipy import io
> M = io.mmread('gd.mm')
> spy(M)
> M.shape
> M.nnz
>
> It looks great and I get the necessary number of dots on my 'spy' plot.
> Then:
>
> spy(M.todense())
>
> This seems to plot only half of the points. At first I thought the
> 'todense' function must be to blame, however:
>
> D = M.todense()
> for i in range(0,231):
> for j in range(0,231):
> if D[i,j]:
> print i,j,D[i,j]
>
> gave me the right data, so it really looks like a bug with spy().
>
> And FWIW spy2(M) fails with an error, whereas spy2(D) shows the same bug
> as spy(D).
>
> Is this something that has been fixed in the new 0.90 release?
The two versions of spy were merged into one, with some rewriting, in
0.90. Please give it a try and see if the problem persists.
Eric
|
|
From: Rob H. <he...@ta...> - 2007-03-07 15:40:15
|
I was recently asked how to make a nonlinear colormap. That is, a colormap that would have breaks at specified levels so that you can add details where they are important. And example is a filled contour of topography, where it is important to show details in the shallow regions, but also the larger changes from the shelf to the deep ocean. Desired levels are often approximately exponentially increasing (but it's also nice to have contour lines be on round numbers). Attached is my solution to this problem, with the resulting figure. I am not sure this is the best way, and I'm interested to see if anybody has anything better to offer. Also, what's up with the warnings? Can I get rid of these (in a better way than just 'ignoring' them?) -Rob |
|
From: Mark B. <ma...@gm...> - 2007-03-07 15:16:31
|
See the - Gridding irregularly spaced data<http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data>- how to grid scattered data points in order to make a contour or image plot. In the matplotlib cookbook. Mark |
|
From: John H. <jd...@gm...> - 2007-03-07 14:48:24
|
On 3/6/07, Jouni K. Sepp=E4nen <jk...@ik...> wrote:
> kc1...@ya... writes:
> > How do I draw a line going from point A to point B on a figure (not
It probably makes more sense not to use Axes.plot at all, since the
line is not associated with an Axes
from matplotlib.lines import Line2D
from pylab import figure, show, nx
fig =3D figure()
line =3D Line2D([100,200,300,400,500], [100,400, 350, 200, 500],
linewidth=3D4, color=3D'green')
fig.lines.append(line)
show()
But this feature isn't used very much, and one thing that we are not
currently supporting (but should) is the zorder for Artists in the
Figure. So if you have an Axes in your plot and you want the line to
go over it, you'll need to do something like Jouni suggested so the
line will be drawn above the Axes.
|
|
From: Zack 2. <za...@gm...> - 2007-03-07 13:23:50
|
Hi, I've found no possibility to plot my experimental data with Matplotlib. The data are coming in the form of a list of xyz vector. [[1,2,3],[4,5,6],...] But Matplotlib needs 2D grid, which I can't provide. Does anybody know a solution of such a problem? It will be pretty nice to integrate a conversion from the list format I pointed on into 2D grid. I guess for correct transformation will be nice to define the area where provided data make sense. Using arbitrary area for 2D plotting will be even better for everyone, cause 2D rectangle grid is very particular case, which can be realized mostly for function plotting and even not for every function. Second question will be whether it is possible to shift the Z axis for better data presentation of surface plot, or one has to subtract the certain value to see the profile more clearly. Thanks in advance! Thanks for great lib. Alexey |
|
From: John P. <joh...@st...> - 2007-03-07 11:26:40
|
Hi all
I have got some funny behaviour here that looks like a bug with the
spy() function. Using the latest python-matplotlib 0.87.5 package on
Ubuntu 6.10, I try:
$ ipython -pylab
from scipy import io
M = io.mmread('gd.mm')
spy(M)
M.shape
M.nnz
It looks great and I get the necessary number of dots on my 'spy' plot.
Then:
spy(M.todense())
This seems to plot only half of the points. At first I thought the
'todense' function must be to blame, however:
D = M.todense()
for i in range(0,231):
for j in range(0,231):
if D[i,j]:
print i,j,D[i,j]
gave me the right data, so it really looks like a bug with spy().
And FWIW spy2(M) fails with an error, whereas spy2(D) shows the same bug
as spy(D).
Is this something that has been fixed in the new 0.90 release?
Cheers
JP
--
John Pye
Department of Mechanical and Manufacturing Engineering
University of New South Wales, Sydney, Australia
http://pye.dyndns.org/
|
|
From: <jk...@ik...> - 2007-03-07 04:39:26
|
kc1...@ya... writes: > How do I draw a line going from point A to point B on a figure (not > plot reference frame), with a particular color and style? Give a transform=gcf().transFigure argument to plot: http://www.scipy.org/Cookbook/Matplotlib/Transformations If your line goes outside the axes, you will want to do something like l=plot([...], [...], transform=gcf().transFigure) setp(l, clip_on=False) For some reason the clip_on keyword argument to plot does not have an effect. This is probably a bug. -- Jouni K. Seppänen http://www.iki.fi/jks |