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
|
From: Peter G. <pgr...@ge...> - 2004-09-28 02:37:29
|
Hi: Want to inquire about gnuplot's 'steps' like functionality in matplotlib's plotting. A good example is show here: http://chem.skku.ac.kr/~wkpark/tutor/gnuplot/gpdocs/steps.htm In a most hack-ish way possible, for the sake of testing I tried this (modified simple_plot.py example): -------------- #!/usr/bin/env python from matplotlib.matlab import * figure(1) t = arange(0.0, 1.0, 0.01) s = sin(2*2*pi*t) t2=concatenate((t[1:], array([t[-1]])), 1) s2=concatenate((array([s[0]]), s[:-1]), 1) hlines(s, t, t2) vlines(t, s, s2) gca().autoscale_view() #Using 60.2; need to call this for the the parts below y=0 to be visible xlabel('time (s)') ylabel('voltage (mV)') title('About as simple as it gets, folks')' grid(True) #axis([0,1,-1,1]) savefig('simple_plot') show() ------------- It seems to work quite nicely, but I think an ideal way of doing this would be to incorporate it into the plot() command. Perhaps adding an option 'steps' (following gnuplot's convention could have steps equal 'histeps', 'fsteps' or just 'steps' - see link above.. None could mean regular plot() behavior). I would say this would be the most elegant option, but probably would call for John (or someone else from the core developers) to make the changes. Alternatively we could use above and wrap it in a plot_step() function. Any interest in this? If so which way do we want to go? Peter |
From: Humufr <hu...@ya...> - 2004-09-27 17:39:31
|
John Hunter wrote: >>>>>>"Humufr" == Humufr <hu...@ya...> writes: >>>>>> >>>>>> > > Humufr> Hello, I would like to know how can I change the > Humufr> axes properties for the font of the tick label. I was > Humufr> trying to use something like: > > Humufr> xticklabels = get(gca(), 'xticklabels') set(xticklabels, > Humufr> 'fontweight', 'bold') > > Humufr> and that's work for some parameter (fontweight for > Humufr> example) but it's not possible to choose some others like > Humufr> the font type or the angle. > >You need to pick the right property names: rotation rather than angle, >fontname or family for the fontname or family > > from matplotlib.matlab import * > > plot([1,2,3]) > labels = get(gca(), 'xticklabels') > set(labels, fontweight='bold', rotation=45, fontname='cmr10') > > show() > >You may want to read http://matplotlib.sourceforge.net/fonts.html and >the fonts section in the rc file to decide if you want to use the >family or fontname property. > >I think one of the reasons you may be having problem with the fontname >is that matplotlib appears to fail silently when you specify a font >that it doesn't find. In this case, it falls back on a known font. >We hope to add a verbose feature so you can get some diagnostic >information about what the font finder is doing. > Hi, Thanks for your answer, I have been able to change the font but the things I don't like, no that I think it's not coherent with other matplotlib command is that in the font you can't ask fontname=Courier" and fontstyle="Italic" (the term angle was bad in my precedent mail :) ). That doesn't work. Perhaps it's a problem with my installation (debian and package from this distribution and Suse and matplotlib install by hand) but I have an error message when I'm trying to have some Italic. I wa trying to use the script: http://matplotlib.sourceforge.net/examples/fonts_demo.py and I have this message when the script want plot the italic fonts: Could not match cursive, normal, normal. Returning /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf Could not match fantasy, normal, normal. Returning /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf Could not match sans-serif, italic, normal. Returning /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf Could not match sans-serif, italic, normal. Returning /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf Could not match sans-serif, italic, normal. Returning /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf I defined the TTFPATH and I have no change. I have something else weird with the fonts. I verified i=with Ipython and from matplotlib.font_manager import fontManager, FontProperties from matplotlib.matlab import * p = FontProperties() p.get_family() the different fonts available. I obtain: ['Lucida Grande', 'Verdana', 'Geneva', 'Lucida', 'Bitstream Vera Sans', 'Arial', 'Helvetica', 'sans-serif'] but if I'm trying to use the font Arial and italic in the script that give me this message: Could not match sans-serif, italic, normal. Returning /usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf It's seems that the change introduce in the script is not use and that matplotlib are using only Vera fonts with no style. fonts = { 'color' : 'k', 'fontname' : 'Courier', 'fontweight' : 'bold', 'fontstyle' : 'italic', 'fontsize' : 'xx-large' } ylabel('toto',fonts) give me exactly the same things than: fonts = { 'color' : 'k', 'fontname' : 'Arial, 'fontweight' : 'bold', 'fontstyle' : 'italic', 'fontsize' : 'xx-large' } ylabel('toto',fonts) The only things that seems to work is the fontweigth. I have exactly the same things if I'm doing: t = ylabel('label') set(t,'fontstyle','italic') I did probably something wrong but I can't find where so I'm asking for some help, Nicolas |
From: John H. <jdh...@ac...> - 2004-09-27 16:09:06
|
>>>>> "Alan" == Alan G Isaac <ai...@am...> writes: Alan> Is there another way I am supposed to be achieving this Alan> behavior? And can the warning be elaborated a bit, so it is Alan> clearer why this is a bad idea? In truth, the latest release of matplotlib sets a flag on show to prevent repeated calls from doing any real damage. But for classroom use, I suggest you just put "interactive : True" in your rc file and then you have no need for show. Is there a downside to this approach? JDH |
From: Alan G I. <ai...@am...> - 2004-09-27 15:51:09
|
We are warned to use show() at most once per script: http://matplotlib.sourceforge.net/faq.html#SHOW For scripts I use in a classroom setting, I generally need to call show() several times: once for each of a sequence of figures. I have been doing this with the TKAgg backend, and I have had almost no problems. A figure is shown, and the script does not continue until I close the figure (by clicking its close button). This is the behavior I want. Is there another way I am supposed to be achieving this behavior? And can the warning be elaborated a bit, so it is clearer why this is a bad idea? Thank you, Alan Isaac |
From: Humufr <hu...@ya...> - 2004-09-25 01:06:35
|
Hello, I found a problem with the function errorbar. I'm trying to change the width of the errorbar. The only way to do this seems to pass by the file .matplotlibrc and the default line width (it's not very useful I think and an option linewidth will be welcome in the errorbar function). The second problem is for the caps who are not change even with the global change (see figure in attachement). Nicolas |
From: John H. <jdh...@ac...> - 2004-09-24 22:49:08
|
>>>>> "Daniel" == Daniel Ferreira <da...@te...> writes: Daniel> Hi, I'm learning how to use matplotlib and I'm having a Daniel> problem with show(). I did the simplest example of the Daniel> Tutorial on the Matplotlib's homepage: Daniel> from matplotlib.matlab import * plot([1,2,3,4]) show() Daniel> It works fine, but when I try to run it again (second time Daniel> on the same session), the plot is not shown. I have Daniel> another question too: when I run the show() command, my Daniel> program stops and only continues when I close the plot Daniel> windows. Is there anyway of show the plot and continues Daniel> the program with the plot window openned? Daniel> I'm using matplotlib 0.64.4-1 on a Debian GNU/Linux. Is this the right version number? I didn't know matplotlib 0.64 was out yet :-) Daniel> Sorry about my poor english. I didn't even notice - it's not that poor! The usage of show is a source of confusion to all new users of matplotlib -- you are not alone. Please see the FAQ http://matplotlib.sf.net/faq.html#SHOW. The main idea is that show is only meant to be used in matplotlib scripts, not interactively from the python shell. If working interactively (type some commands, look at a figure, type some more commands), you need to set interactive to be True in your rc file. Once you have done this (and restarted python) you won't need to call show at all in an interactive session. See also http://matplotlib.sf.net/interactive.html and http://matplotlib.sf.net/.matplotlibrc. I will try and update the tutorial to make this clearer. For interactive work, I also recommend you set your backend to TkAgg in your .matplotlibrc file. Or use ipython with the pylab option - google for matplotlib and ipython. Hope this helps, JDH |
From: Daniel F. <da...@te...> - 2004-09-24 22:25:05
|
Hi, I'm learning how to use matplotlib and I'm having a problem with show(). I did the simplest example of the Tutorial on the Matplotlib's homepage: from matplotlib.matlab import * plot([1,2,3,4]) show() It works fine, but when I try to run it again (second time on the same session), the plot is not shown. I have another question too: when I run the show() command, my program stops and only continues when I close the plot windows. Is there anyway of show the plot and continues the program with the plot window openned? I'm using matplotlib 0.64.4-1 on a Debian GNU/Linux. Sorry about my poor english. Thanks. Daniel. |
From: Andrew S. <str...@as...> - 2004-09-24 17:09:51
|
John Hunter wrote: >>>>>>"Alan" == Alan G Isaac <ai...@am...> writes: >>>>>> >>>>>> > > Alan> Now that you have given us axhline as a generalization of > Alan> gnuplot's set xzeroaxis please consider letting xticks take > Alan> an optional "loc" argument, which could either be "border" > Alan> or a number to be interpreted as a 'y' value. > > Alan> So, e.g., axhline() xticks(arange(5),loc=0) would draw an > Alan> xzeroaxis and put the xtics along it. > > > I tried your suggestion in gnuplot, and I found the results to be ugly -- the ticks straddled the axis line, rather than being inside or outside. But I see, in theory, what you mean. >However, there is a rub. Sometimes you probably want to place the >xaxes y location in data units, eg at y=0. Note that this is not the >same as y=0 in axes coords, which is always the bottom of the >rectangle. This is possible since matplotlib lets you specify the x >and y data in different data coordinate systems, eg with >http://matplotlib.sourceforge.net/matplotlib.transforms.html#-blend_xy_sep_transform, > > Hmm... that URL is not working for me, but I found what you referenced at http://matplotlib.sourceforge.net/matplotlib.transforms.html >but I think it would take some work to make the interface easy and >intuitive. The other trick, from the developer side, is to couple the >location of the ticks and tick labels to the y coord of the axes line. >Doable, certainly, but would require some redesign because currently >they all "know" their location. > > It seems using scipy's traits object for its ability to set observers on a variable may be useful here. As I said earlier, I may take a stab at this, but I always feel as if I'm "hacking in the dark" when I try and grasp matplotlib's transform and render model... When/if I look at this in greater detail, I'll surely let you know! :) If you're going to a new render model in the future (kiva?), I wonder how useful or long-term would any changes I made now be? Cheers! Andrew |
From: John H. <jdh...@ac...> - 2004-09-24 16:38:41
|
>>>>> "Humufr" == Humufr <hu...@ya...> writes: Humufr> Hello, I would like to know how can I change the Humufr> axes properties for the font of the tick label. I was Humufr> trying to use something like: Humufr> xticklabels = get(gca(), 'xticklabels') set(xticklabels, Humufr> 'fontweight', 'bold') Humufr> and that's work for some parameter (fontweight for Humufr> example) but it's not possible to choose some others like Humufr> the font type or the angle. You need to pick the right property names: rotation rather than angle, fontname or family for the fontname or family from matplotlib.matlab import * plot([1,2,3]) labels = get(gca(), 'xticklabels') set(labels, fontweight='bold', rotation=45, fontname='cmr10') show() You may want to read http://matplotlib.sourceforge.net/fonts.html and the fonts section in the rc file to decide if you want to use the family or fontname property. I think one of the reasons you may be having problem with the fontname is that matplotlib appears to fail silently when you specify a font that it doesn't find. In this case, it falls back on a known font. We hope to add a verbose feature so you can get some diagnostic information about what the font finder is doing. Humufr> Another things I saw in the website, a lot of links are Humufr> not working (example: Humufr> http://matplotlib.sourceforge.net/figure.html#Axis\ ) That should be http://matplotlib.sourceforge.net/matplotlib.figure.html#Axis. I fixed this (in my local copy). Let me know if you find some more. JDH |
From: Humufr <hu...@ya...> - 2004-09-24 16:15:31
|
Hello, I would like to know how can I change the axes properties for the font of the tick label. I was trying to use something like: xticklabels = get(gca(), 'xticklabels') set(xticklabels, 'fontweight', 'bold') and that's work for some parameter (fontweight for example) but it's not possible to choose some others like the font type or the angle. Another things I saw in the website, a lot of links are not working (example: http://matplotlib.sourceforge.net/figure.html#Axis ) Thanks, Nicolas |
From: Jean-Baptiste C. <jc...@de...> - 2004-09-23 11:17:45
|
S=E6l, About a year ago John Hunter proposed a routine to rotate pango text ( draw= _text_rotated) I wonder if the procedure has been implemented by default in a pango method= yet. It would be VERY useful for many to have the possibility to rotate pangolay= out, at least by 90,180,270 degrees Takk Kv. Jean-Baptiste >>>>> "John" =3D=3D John Hunter <jdhunter at ace.bsd.uchicago.edu> writes: John> I want to rotate some text 90 degrees. I'm using pango John> layouts and drawable.draw_layout to draw my text. OK, got this working at the level of manipulating individual pixels in a gtk.gdk.Image with pixbufs and pixmaps. For my purposes, making ylabels, this is probably fast enough, but if anyone has a more efficient solution, let me know... However, if the 'Rotate' button is clicked repeatedly, which just repeats the rotated drawing operation, strange things start to appear in the region where the rotated text is rendered. Since repeated clicks should just be repeating the same drawing operations, it is not clear to me why this is happening. Below is an example script. John Hunter import pygtk pygtk.require('2.0') import gtk import pango win =3D gtk.Window() win.show() vbox =3D gtk.VBox() vbox.show() win.add(vbox) class C: def __init__(self, text): self.text =3D text =20 def realize(self, drawingArea): self.drawingArea =3D drawingArea self.drawable =3D drawingArea.window # text properties context =3D self.drawingArea.create_pango_context() self.layout =3D self.drawingArea.create_pango_layout(self.text) desc =3D pango.FontDescription('Sans 14') self.layout.set_font_description(desc) =20 def draw_text(self, drawable=3DNone, x=3D100, y=3D100): if drawable is None: drawable=3Dself.drawable =20 # draw some text in the foreground color gc =3D drawable.new_gc() drawable.draw_layout(gc, x=3Dx, y=3Dy, layout=3Dself.layout) =20 def draw_text_rotated(self): """ draw the text to a pixmap, rotate the image, fill a pixbuf and draw from the pixbuf """ inkRect, logicalRect =3D self.layout.get_pixel_extents() x, y, w, h =3D logicalRect winw, winh =3D self.drawable.get_size() pixmap =3D gtk.gdk.Pixmap(self.drawable, winw, winh) c.draw_text(drawable=3Dpixmap, x=3D0, y=3D0) gc =3D pixmap.new_gc() if 0: # These lines test that the pixmap was drawn to ok pixbuf =3D gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, 0, 8, w, h) pixbuf.get_from_drawable(pixmap, pixmap.get_colormap(), 0, 0, 0, 0, w, h) pixbuf.render_to_drawable(self.drawable, gc, 0, 0, 0, 0, w, h, = 0, 0, 0) return=20 imageIn =3D pixmap.get_image(x=3D0, y=3D0, width=3Dw, height=3Dh) imageOut =3D gtk.gdk.Image(type=3D0, visual=3Dpixmap.get_visual(), width=3Dh, height=3Dw) imageOut.set_colormap(imageIn.get_colormap()) for i in range(w): for j in range(h): imageOut.put_pixel(j, i, imageIn.get_pixel(w-i-1,j) ) pixbuf =3D gtk.gdk.Pixbuf(colorspace=3Dgtk.gdk.COLORSPACE_RGB, has_alpha=3D0, bits_per_sample=3D8, width=3Dh, height=3Dw) pixbuf.get_from_image(src=3DimageOut, cmap=3DimageIn.get_colormap(), src_x=3D0, src_y=3D0, dest_x=3D0, dest_y=3D0, width=3Dh, height=3Dw) pixbuf.render_to_drawable(self.drawable, gc, src_x=3D0, src_y=3D0, dest_x=3D50, dest_y=3D100, width=3Dh, height=3Dw, dither=3D0, x_dither=3D0, y_dither=3D0) =20 =20 =20 =20 c =3D C('Some text') da =3D gtk.DrawingArea() da.connect('realize', c.realize) da.set_size_request(300,300) da.show() vbox.pack_start(da, gtk.TRUE, gtk.TRUE) hbox =3D gtk.HBox() hbox.show() vbox.pack_start(hbox, gtk.FALSE, gtk.FALSE) button =3D gtk.Button('Draw') button.show() button.connect('clicked', lambda b: c.draw_text()) hbox.pack_start(button, gtk.TRUE, gtk.TRUE) button =3D gtk.Button('Rotate') button.show() button.connect('clicked', lambda b: c.draw_text_rotated()) hbox.pack_start(button, gtk.TRUE, gtk.TRUE) button =3D gtk.Button('Quit') button.show() button.connect('clicked', lambda b: gtk.mainquit()) hbox.pack_start(button, gtk.TRUE, gtk.TRUE) gtk.mainloop() --=20 ----------------------------- Jea...@de... Department of Statistics deCODE genetics Sturlugata,8 570 2993 101 Reykjav=EDk |
From: Gary R. <ga...@em...> - 2004-09-23 00:22:01
|
My comment would be that I agree with Fl=E1vio for the specific case of e= rrorbar plots. That is, when you have errorbars, you want them slightly i= nset from the axes so that it's clear where they finish. I think this onl= y applies to errorbar plots. So, if there's an easy way to have the scali= ng differentiate, I'd say the endpoints should NOT always exceed the data= end points, but should for errorbar plots. I'm think changing the defaul= t behaviour would upset lots of people. Another idea might be to just add a command like autoscale(factor) or aut= oscale(margin) or margin(inset) to specify on a per-case basis. Gary ----- Original Message ----- From: John Hunter <jdh...@ac...> Date: Wed, 22 Sep 2004 06:31:58 -0500 To: Fl=E1vio Code=E7o Coelho <fcc...@fi...> Subject: Re: [Matplotlib-users] problem with x scale on error bar plot > >>>>> "Fl=E1vio" =3D=3D Fl=E1vio Code=E7o Coelho <fcc...@fi...> = writes: >=20 > Fl=E1vio> Hi john, I am getting a bad autoscale when I generate a > Fl=E1vio> two point y-error errorbar plot: >=20 > Fl=E1vio> As you can see in the figure attached the points are > Fl=E1vio> falling on the margin of the plot. >=20 > Fl=E1vio> I think a space before the first point and after the last > Fl=E1vio> point of the plot should be added automatically, since no > Fl=E1vio> one will want a plot like this by default. >=20 > This is a fix that is trivial to implement. But I would like to get > some feedback because changing the default would affect every almost > all matplotlib plots. >=20 > The question is: should the autoscale endpoints always exceed the data > end points, or are there some cases in which it is desirable for the > datalim and viewlim to coincide? In this case >=20 > from matplotlib.matlab import * > plot([1,2], 'o') > show() >=20 > it seems like you want the viewlim to exceed the datalim. In cases > like >=20 > from matplotlib.matlab import * > t =3D linspace(0,1,100) > plot(t, sin(2*pi*t)) > show() >=20 > it looks to me like having the xlim at 0,1 is the best solution. >=20 > To change the behavior, edit matplotlib/ticker.py and search for class > MultipleLocator. In the autoscale method, change >=20 > vmin =3D self.base.le(dmin) > vmax =3D self.base.ge(dmax) >=20 > to > vmin =3D self.base.lt(dmin) > vmax =3D self.base.gt(dmax) >=20 > and try both of the examples above in the le/ge case and in the lt/gt > case. >=20 > JDH >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users --=20 ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm |
From: Chris B. <Chr...@no...> - 2004-09-22 16:54:09
|
John Hunter wrote: > Printing is typically platform dependent wxPython provides a platform independent printing framework. It certainly should be possible to make use of it in the wx Back end. When I have a need for it, I may take a stab at it. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
From: John H. <jdh...@ac...> - 2004-09-22 12:34:10
|
>>>>> "Alan" == Alan G Isaac <ai...@am...> writes: Alan> Now that you have given us axhline as a generalization of Alan> gnuplot's set xzeroaxis please consider letting xticks take Alan> an optional "loc" argument, which could either be "border" Alan> or a number to be interpreted as a 'y' value. Alan> So, e.g., axhline() xticks(arange(5),loc=0) would draw an Alan> xzeroaxis and put the xtics along it. Alan> Am I overlooking an obvious way to do this (in the matlab Alan> module)? Andrew Straw contacted me earlier about a related issue, that is, to be able to offset the x axis line, ticks, and label away from the data region, as in http://dickinson.caltech.edu/research_visualflightcontrol.html. I think this is a generally useful thing. Currently, the axes border is drawn as a rectangle, with a facecolor and the border determined by the rectangle edgecolor. The ticks are then placed on the rectangle border. The proposal is to change this behavior, so that the rectangle border edgecolor becomes the same as the facecolor (ie invisible border). The border is then replaced by four lines, call them bottom, top, left and right. Each of these four lines could be placed independently in axes coords: 0,0,1,1 = left, bottom, right, top. Eg, the bottom line would default to bottom = Line2D([0,1], [0,0], transform=ax.transAxes) ie it the x range would stretch from 0-1 (left-right) and the y coord would be 0 (bottom) in axes coords. To offset this line below the data range (the white rectangle defined by the axes box) you could, for example, make the ycoord -0.1. To place the x axes in the middle of the axes box, you would make the ycoord 0.5. However, there is a rub. Sometimes you probably want to place the xaxes y location in data units, eg at y=0. Note that this is not the same as y=0 in axes coords, which is always the bottom of the rectangle. This is possible since matplotlib lets you specify the x and y data in different data coordinate systems, eg with http://matplotlib.sourceforge.net/matplotlib.transforms.html#-blend_xy_sep_transform, but I think it would take some work to make the interface easy and intuitive. The other trick, from the developer side, is to couple the location of the ticks and tick labels to the y coord of the axes line. Doable, certainly, but would require some redesign because currently they all "know" their location. JDH |
From: John H. <jdh...@ac...> - 2004-09-22 12:21:18
|
>>>>> "Fl=E1vio" =3D=3D Fl=E1vio Code=E7o Coelho <fcc...@fi...> wr= ites: Fl=E1vio> Hi john, I am getting a bad autoscale when I generate a Fl=E1vio> two point y-error errorbar plot: Fl=E1vio> As you can see in the figure attached the points are Fl=E1vio> falling on the margin of the plot. Fl=E1vio> I think a space before the first point and after the last Fl=E1vio> point of the plot should be added automatically, since no Fl=E1vio> one will want a plot like this by default. This is a fix that is trivial to implement. But I would like to get some feedback because changing the default would affect every almost all matplotlib plots. The question is: should the autoscale endpoints always exceed the data end points, or are there some cases in which it is desirable for the datalim and viewlim to coincide? In this case from matplotlib.matlab import * plot([1,2], 'o') show() it seems like you want the viewlim to exceed the datalim. In cases like from matplotlib.matlab import * t =3D linspace(0,1,100) plot(t, sin(2*pi*t)) show() it looks to me like having the xlim at 0,1 is the best solution. To change the behavior, edit matplotlib/ticker.py and search for class MultipleLocator. In the autoscale method, change vmin =3D self.base.le(dmin) vmax =3D self.base.ge(dmax) to vmin =3D self.base.lt(dmin) vmax =3D self.base.gt(dmax) and try both of the examples above in the le/ge case and in the lt/gt case. JDH |
From: John H. <jdh...@ac...> - 2004-09-22 12:07:05
|
>>>>> "Wayne" == Wayne Christopher <wa...@4r...> writes: Wayne> I have a general performance question - is matplotlib Wayne> expected to deal well with large plots when you are zoomed Wayne> into a small region? That is, if I have 100K points in a Wayne> graph but have set my limits so that only 100 of them are Wayne> visible at one time, should that be comparable to creating Wayne> a plot with only the visible items and re-creating it each Wayne> time the limits are moved? (Assuming the X axis is Wayne> monotonic and I do the obvious type of filtering in Wayne> Python.) It seems to be a bit sluggish... There is a data filtering mode already built in, which is designed for the case, as you suggest, that x is monotonic. To use it, you set the property 'data_clipping=True' as in plot(x, y, data_clipping=True) However, I tried it in your test case and it doesn't help a lot. The reason is the numeric clip is too time consuming. However, I think I know a good fix. In the current implementation, the data is clipped to the view limits, and every time the view limits are moved the clip has to be performed again. It would be better to clip to for example vmax, vmin = ax.get_xlim() interval = vmax-vmin clipmin = vmin-interval clipmax = vmax+interval and only update the clip lim when a new vlim / vmax exceeds them. Then you would only have top perform the clip occasionally, which would be a big when if you have a large x range and have zoomed into a narrow part of the interval. I'll take a stab at it. JDH |
From: John H. <jdh...@ac...> - 2004-09-22 12:00:57
|
>>>>> "Humufr" == Humufr <hu...@ya...> writes: Humufr> Hello, I would like to know if it's Humufr> possible to have only the figure save in postscript. An Humufr> eps file in some sort with not white above or at the Humufr> bottom of the page? Yes, you simply need savefig('somefile.eps') at the end of your script. If you are using a GUI dialog box, you just specify the eps extension on the filename. JDH |
From: John H. <jdh...@ac...> - 2004-09-22 11:59:41
|
>>>>> "Gary" == <ga...@op...> writes: Gary> Hi all, I am trying to incorporate viewing of charts and the Gary> printing of the viewed chart from an application written in Gary> WxPython V2.5 and Python V2.3 My preference at the momment Gary> is to use the EMBEDDED method of displaying the charts in my Gary> Python app. I want to have a print button that the user can Gary> just click to get a printout of the chart. Gary> Can anyone point me to somewhere that tells me how to print Gary> a displayed chart. Printing is typically platform dependent, which you don't mention. Here is a solution for embedded wxagg on win32 http://sourceforge.net/mailarchive/message.php?msg_id=9061267 Let me know if this works for you... JDH |
From: <ga...@op...> - 2004-09-22 04:04:30
|
Hi all, I am trying to incorporate viewing of charts and the printing of the = viewed chart from an application written in WxPython V2.5 and Python = V2.3 My preference at the momment is to use the EMBEDDED method of displaying = the charts in my Python app. I want to have a print button that the = user can just click to get a printout of the chart. Can anyone point me to somewhere that tells me how to print a displayed = chart. Thanks Gary Giles |
From: Wayne C. <wa...@4r...> - 2004-09-21 17:08:32
|
I have a general performance question - is matplotlib expected to deal well with large plots when you are zoomed into a small region? That is, if I have 100K points in a graph but have set my limits so that only 100 of them are visible at one time, should that be comparable to creating a plot with only the visible items and re-creating it each time the limits are moved? (Assuming the X axis is monotonic and I do the obvious type of filtering in Python.) It seems to be a bit sluggish... Thanks, Wayne |
From: Alan G I. <ai...@am...> - 2004-09-21 15:03:09
|
> Alan G Isaac wrote: >> It would be great to be able to, e.g., >> matlab.plot(d,f(d),'(1,1,0)-') >> or >> matlab.plot(d,f(d),'#eeefff-') On Tue, 21 Sep 2004, Gary apparently wrote: > I second the request. > But I have an idea. Try this: > matlab.plot(d, f(d), color = (1,0,0)) In retrospect it is obvious. Better yet, you can matlab.plot(d, f(d), '--', color = (1,0,0)) etc. Excellent! Thank you! Alan Isaac |
From: Humufr <hu...@ya...> - 2004-09-21 14:31:32
|
Hello, I would like to know if it's possible to have only the figure save in postscript. An eps file in some sort with not white above or at the bottom of the page? Thanks, Nicolas |
From: Alan G I. <ai...@am...> - 2004-09-21 13:41:38
|
On Tue, 21 Sep 2004, Gary apparently wrote: > import matplotlib.colors > help(matplotlib.colors) Yes, I've been using this to set arbitrary colors everywhere except in the plot command. Maybe I'm missing something obvious, but the 3rd argument to a plot command must be a string, and despite the apparent suggest in the docs, hex strings are not supported. That is, I cannot find a way to do this. It would be great to be able to, e.g., matlab.plot(d,f(d),'(1,1,0)-') or matlab.plot(d,f(d),'#eeefff-') Am I missing an obvious way to do this? fwiw, Alan |
From: Flavio C. C. <fcc...@ci...> - 2004-09-21 13:23:02
|
A quick google search reveals that someone has already published a tutorial for animating graphs made with matplotlib using mencoder... Check it out: http://web.media.mit.edu/~lifton/code/GraphMovies/ He even provides an example script... Synchronicity... Cheers, Flavio On Mon, 2004-09-20 at 20:50, John Hunter wrote: > >>>>> "Peter" == Peter Groszkowski <pgr...@ge...> writes: > > Peter> use mplayer to put the png images together.. results are > Peter> quite nice... > > Can you post the command you use to play the pngs? Can mplayer output > an avi or mpg, or does it just animate the images. > > I saw from the man pages that something like > > mplayer mf=type=png:fps=25 mf:/filemask > > is required, but I don't know how to set the filemask of if this is > the right approach. I'd like to add some instructions to the FAQ. > > Thanks, > JDH > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Alan G I. <ai...@am...> - 2004-09-21 05:07:22
|
matplotlib.matlab allows control of axis (border) display with axis('off') Is finer control offered? If not, please consider the following an enhancement request. I like the behavior of gnuplot, where borders are encoded in a 12-bit integer. The bottom four bits control the border for a 2D plot. Bit include plot axis/border: 1 bottom 2 left 4 top 8 right I find it possible to mimic this using the new axhline and axvline to a certain extent (but, e.g., no tics). However a axvline placed at ymin tends not to display on screen unless linewidth is increased. fwiw, Alan Isaac |