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
(19) |
2
(30) |
3
(14) |
4
(1) |
5
(16) |
6
(7) |
7
(12) |
8
(14) |
9
(35) |
10
(16) |
11
(31) |
12
(6) |
13
(14) |
14
(13) |
15
(20) |
16
(15) |
17
(27) |
18
(5) |
19
(10) |
20
(22) |
21
(20) |
22
(30) |
23
(25) |
24
(11) |
25
(2) |
26
(2) |
27
(23) |
28
(20) |
29
(26) |
30
(25) |
31
(7) |
|
the example works very well, but what I have is 10 numbers that I want to put in between 11 ticks. Actually what I havve is a checkerboard (using pcolor) and I want to label the X and Y of each pixel.... and now I am confused with the API to do that... The example uses objects that can provide Locator and Formatter instances, but I just have a sequence of numbers.... Johann Johann Cohen-Tanugi wrote: > thanks a lot! > Johann > > John Hunter wrote: > >> On Sat, Jul 11, 2009 at 1:15 PM, Eric Firing<ef...@ha...> wrote: >> >> >>> John Hunter wrote: >>> >>> >>>> On Thu, Jul 9, 2009 at 9:44 AM, Johann Cohen-Tanugi<co...@lp...> >>>> wrote: >>>> >>>> >>>>> Hello, how can I center axis tick labels, so that the labels ends up at >>>>> the center between 2 ticks. >>>>> >>>>> >>>>> >>>> There is no support for this, though you can left or right align a >>>> label with a single tick:: >>>> >>>> for label in ax.xaxis.get_xticklabels(): >>>> label.set_horizontalalignment('right') >>>> >>>> JDH >>>> >>>> >>> Labels for intervals rather than ticks would be nice to have; this is >>> commonly used for labeling months or years, for example. I don't have time >>> to work on it now, unfortunately. >>> >>> The best way to fake it with present facilities might be to use no labels on >>> the major ticks, place minor ticks half-way between the majors, set their >>> lengths to zero, and label them. >>> >>> >> Nice idea, just committed this example to svn as >> examples/pylab_examples/centered_ticklabels.py >> >> import datetime >> import numpy as np >> import matplotlib >> import matplotlib.dates as dates >> import matplotlib.ticker as ticker >> import matplotlib.pyplot as plt >> >> # load some financial data; apple's stock price >> fh = matplotlib.get_example_data('aapl.npy') >> r = np.load(fh); fh.close() >> r = r[-250:] # get the last 250 days >> >> fig = plt.figure() >> ax = fig.add_subplot(111) >> ax.plot(r.date, r.adj_close) >> >> ax.xaxis.set_major_locator(dates.MonthLocator()) >> ax.xaxis.set_minor_locator(dates.MonthLocator(bymonthday=15)) >> >> ax.xaxis.set_major_formatter(ticker.NullFormatter()) >> ax.xaxis.set_minor_formatter(dates.DateFormatter('%b')) >> >> for tick in ax.xaxis.get_minor_ticks(): >> tick.tick1line.set_markersize(0) >> tick.tick2line.set_markersize(0) >> tick.label1.set_horizontalalignment('center') >> >> imid = len(r)/2 >> ax.set_xlabel(str(r.date[imid].year)) >> plt.show() >> >> > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to 100,000ドル in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Hi everyone, I am trying to create some brand new types of plots for a unique data set that I have. My question basically boils down to getting some advice on what is the proper way to set up a function that will act like one of the matplotlib pyplot functions (e.g., have all the same behavior regarding interactive stuff, resizing, etc.). I have been looking through some of the code for the major functions like plot, but have been having trouble parsing it. I think that some of this is obfuscated in the complexity of the functions. At some level, I would also like to be able to draw on the canvas in a very explicit way, like in Processing (http://processing.org/); what is the best way to approach this? Another thing that could be really nice is to have some boilerplate framework that someone could start with to quickly write functions that integrate well into the rest of matplotlib. (And sorry if I am sounding critical of the package. I actually love it, and have been quite the MPL evangelist in my little section of Boston.) Any suggestions are welcome. Uri -- Uri Laserson PhD Candidate, Biomedical Engineering Harvard Medical School (Genetics) Massachusetts Institute of Technology (Mathematics) phone +1 917 742 8019 las...@mi...
If your collection of points is a numpy array, you can use the column of y-coordinates as the first argument to the plotting function hlines. E.g, inside ipython --pylab: ptn = array(([1,1],[3,1],[2,4],[4,4])) hlines(ptn[:,1], -1, 1) But at that point the horizontal lines are on the edges of the axis, not visible. This forces them to show: plot([-1, 0, 1],[0.5, 2.5, 4.5]) but perhaps you only want the hlines. What I usually do in a script or function is name all my axes and twiddle their limits in an aesthetic way, but in ipython the following isn't redrawing the plot, for me: a = gca() curlims = a.get_ylim() a.set_ylim([curlims[0] - 0.1, curlims[1] + 0.1]) half-finished, but I hope it helps, &C On Jul 13, 2009, at 13 Jul, 11:56 AM, Afi Welbeck wrote: > Hi, > > I'm a newbie, and I'm trying to plot horizontal > lines with the following points: > [1,1], [3,1], [2,4] and [4,4]. > > Also, is there a way of putting them together in > lists, (say the pair of points that plot one horizontal line ) > for easy plotting? Could anyone please help me with the > code? Thanks. > > Regards, > Harriet A. Welbeck > > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to 100,000ドル in prizes! For a limited > time, > vendors submitting new applications to BlackBerry App World(TM) will > have > the opportunity to enter the BlackBerry Developer Challenge. See > full prize > details at: http://p.sf.net/sfu/Challenge_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Chloe Lewis Graduate student, Amundson Lab Division of Ecosystem Sciences, ESPM University of California, Berkeley 137 Mulford Hall - #3114 Berkeley, CA 94720-3114 ch...@na...
Robert Cimrman wrote: > Hi all, > > I would like to use griddata() to interpolate a function given at > specified points of a bunch of other points. While the method works > well, it slows down considerably as the number of points to > interpolate to increases. > > The dependence of time/(number of points) is nonlinear (see the > attachment) - it seems that while the Delaunay trinagulation itself is > fast, I wonder how to speed-up the interpolation. The docstring says, > that it is based on "natural neighbor interpolation" - how are the > neighbors searched? Does it use the kd-trees like scipy.spatial? I > have a very good experience with scipy.spatial performance. > > Also, is there a way of reusing the triangulation when interpolating > several times using the same grid? > > cheers, > r. Robert: The griddata function uses the delaunay module, which is a straight copy of Robert Kern's delaunay scikit. No one here is that familiar with the internals of delaunay, so I'd suggest you either ask Robert, or dig into the source code yourself (which is here: http://scipy.org/scipy/scikits/browser/trunk/delaunay). -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : Jef...@no... 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
Hi all, as you might know, I'm writing a book about matplotlib. I'm approaching the last chapter, the one I would have liked to dedicate to "science". Editors and I, anyhow, decided it would have been too much off-topic for the public we are targetting, so we have instead decided to present a series of "real world use cases" for matplotlib, situations where graphing can be useful. Some examples could be: - plot data from a database - read a csv and plot its data - webscraping to plot info on a webpage give the wide spectrum of category I can cover, I'd like to introduce some "scientific" examples, something every reader (and not specifically a math/phys guy can only) can read, understand and (avove all) appreciate :) . I'm thinking for example at line interpolation (generate some points and find the line/curve that better interpolate them). But what I'd like is to hear from you what "simple" example you'd like to propose to be in this book. Your collaboration would be really appreciate, because it will let the book be more "user driven" :) Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi
Hi, I'm a newbie, and I'm trying to plot horizontal lines with the following points: [1,1], [3,1], [2,4] and [4,4]. Also, is there a way of putting them together in lists, (say the pair of points that plot one horizontal line ) for easy plotting? Could anyone please help me with the code? Thanks. Regards, Harriet A. Welbeck
Hi all, I would like to use griddata() to interpolate a function given at specified points of a bunch of other points. While the method works well, it slows down considerably as the number of points to interpolate to increases. The dependence of time/(number of points) is nonlinear (see the attachment) - it seems that while the Delaunay trinagulation itself is fast, I wonder how to speed-up the interpolation. The docstring says, that it is based on "natural neighbor interpolation" - how are the neighbors searched? Does it use the kd-trees like scipy.spatial? I have a very good experience with scipy.spatial performance. Also, is there a way of reusing the triangulation when interpolating several times using the same grid? cheers, r. ps: no natgrid In [9]: mpl.__version__ Out[9]: '0.98.5.3'
ehm ehm... maybe bar() ? :-) -- Davide Setti blog: http://blog.flatlandia.eu home: http://www.flatlandia.eu
Hi all, i need to plot an histogram from already calculated data. I think an example can be helpful :-) I have a list: [ (22, 0), (19, 1), (15, 0), ... ] while in each tuple the first number is the height of the bar (the first bar has value 22, the second has value 19...) the second is the "group". I wish to plot every column in a different color, but i think i know how to do this. What i'm not able to do is to plot the histogram in log-log scale, because hist() groups the values into bins, while with vlines i'm not able to set the proper line width with the log scale. Suggestions? Thanks -- Davide Setti blog: http://blog.flatlandia.eu home: http://www.flatlandia.eu
Let me give some results of experience regarding these issues.... On the same dataset of 600 *7500 points, with the simple plot function, (from the example, embedding in wxagg) WxAgg was much faster than Wx... on a linux machine, while the WxAgg drawing appeared close to a second or 2 after launch..., the Wx drawing was displayed after 20 seconds. Same on Windows... Same pattern for GTK vs GTKAgg, though less dramatic... In a small app I wrote, containing 5 plotting windows (each containing around 500 datapoints) on linux, GTK take 1.2 - 1.3 sec to update the plots...GTKAgg took 0.7 - 0.8 sec... on windows, the difference is even larger, GTK is in average 3 times slower than GtKAgg... As for direct comparisons between TkAgg, GTKAgg, WxAgg... it's a bit tricky to time this stuff properly, so it's only my feelings that said that there was no extraordinary performance difference between the different backends (on the same datasets 600*7500 points). They pretty much felt the same, only thing is TkAgg having drawing problems when busy and the window being manipulated... jimmy > > There is some detail along these lines at > > http://matplotlib.sourceforge.net/faq/installing_faq.html#what-is-a-backend > > but not the feature-by-feature comparison you suggest. But for WX vs > WXAgg, definitely WXAgg. > It would be really nice to have some info regarding "speed". I don't know if one has to distinguish let's say the time it take to draw a line with 100k points and the "general" felling of interactive responsiveness !? (E.g. I thought that wx was much faster than wxAgg ... just uglier ) - Sebastian Haase ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to 100,000ドル in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- View this message in context: http://www.nabble.com/Backend-Comparison-tp24444974p24460335.html Sent from the matplotlib - users mailing list archive at Nabble.com.
The problem is gone after upgrade to 0.98.5 On Sat, Jul 11, 2009 at 6:02 PM, Eli Brosh <eb...@gm...> wrote: > My version is 0.98.3 > This is what comes with ubuntu intrepid. > I will try to upgrade from svn. > > Eli > > > On Sat, Jul 11, 2009 at 4:15 PM, John Hunter <jd...@gm...> wrote: > >> On Sat, Jul 11, 2009 at 6:06 AM, Eli Brosh<eb...@gm...> wrote: >> > Hello, >> > I encountered a problem when trying to draw a legend outside the axes. >> > For some reason, when the legend is placed outside the axes, the markers >> are >> > not drawn near the labels. >> > >> > I attach two scripts and two corresponding figures. >> > the only differences between the scripts is the location of the legend. >> > When the legend is placed inside the axes, everything is OK. >> > However, when the legend is outside the markers are gone. >> > >> > Is this a bug ? >> > Is there a way around it ? >> >> I am not seeing this problem in mpl svn (what version are you using). >> perhaps you can upgrade to svn? >> >> http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn >> >> JDH >> > >
Thanks John, Sorry, this is too heavy for my programming skills. I hope to be able to contribute some time later. Eli On Sat, Jul 11, 2009 at 7:55 PM, John Hunter <jd...@gm...> wrote: > On Sat, Jul 11, 2009 at 9:55 AM, Eli Brosh<eb...@gm...> wrote: > > Thanks John, > > A kwarg fillstyle with options 'full|top|bottom|left|right' for any > marker > > is certainly better than what i have done. > > I just did not have an idea how to program this kwarg. > > Further, I can't see an easy way of generalizing the half-filling of > > markers. > > is there a better way than just programming each half-filled marker > > separately ? > > Perhaps if you can give me some hints, I can try to do the rest of the > work. > > > Sure, first take a look at the coding guide, in particular these two > sections which introduce kwarg processing and documentation > conventions. > > > http://matplotlib.sourceforge.net/devel/coding_guide.html#keyword-argument-processing > > http://matplotlib.sourceforge.net/devel/coding_guide.html#documentation-and-docstrings > > Basically, any new "property", where I use quotes because mpl > properties are not the same as python properties, needs a setter and > getter. The setter must also have an ACCEPTS flag, which gives the > acceptable arguments. mpl uses these in the setp and getp > introspection facilities, as well as in the auto-table building of > kwargs in the docs. The artist.ArtistInspector is used to insepct the > functions and docs to extract the properties: > > http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.artist.ArtistInspector > > > > I've committed a patch to svn that implements the fillstyle property > for Line2D, and implemented it for draw_square. The other filled > markers raise a NotImplementedError if the fillstyle is not 'full', > and that is where you come in. The basic implementation is to draw > two half markers, one filled and one unfilled, and use the rotation > property of the transformation to support the various > left|right|bottom|top. Here is the reference implementation for > draw_square:: > > def _draw_square(self, renderer, gc, path, path_trans): > gc.set_snap(renderer.points_to_pixels(self._markersize) >= 2.0) > side = renderer.points_to_pixels(self._markersize) > transform = Affine2D().translate(-0.5, -0.5).scale(side) > rgbFace = self._get_rgb_face() > fs = self.get_fillstyle() > if fs=='full': > renderer.draw_markers(gc, Path.unit_rectangle(), transform, > path, path_trans, rgbFace) > else: > # build a bottom filled square out of two rectangles, one > # filled. Use the rotation to support left, right, bottom > # or top > if fs=='bottom': rotate = 0. > elif fs=='top': rotate = 180. > elif fs=='left': rotate = 270. > else: rotate = 90. > > bottom = Path([[0.0, 0.0], [1.0, 0.0], [1.0, 0.5], [0.0, > 0.5], [0.0, 0.0]]) > top = Path([[0.0, 0.5], [1.0, 0.5], [1.0, 1.0], [0.0, > 1.0], [0.0, 0.05]]) > transform = transform.rotate_deg(rotate) > renderer.draw_markers(gc, bottom, transform, > path, path_trans, rgbFace) > renderer.draw_markers(gc, top, transform, > path, path_trans, None) > > > See examples/pylab_examples/fillstyle_demo.py in svn, and the attached > patch (although this is already committed, it might be instructional > so you can see the steps needed to add a new property). When you > finish the others, send along an svn diff and some more examples in > the fillstyle_demo and I'll commit it. > > Thanks! > JDH >
On Sun, Jul 12, 2009 at 5:23 AM, John Hunter<jd...@gm...> wrote: > On Sat, Jul 11, 2009 at 7:31 PM, Brian Lewis<bri...@gm...> wrote: >> Does there exist any big-picture comparisons of the provided backends? For >> example, it would be nice to know what features each backend has or lacks. >> It would also be nice to which backends were generally faster...and which >> were recommended (WX or WXAgg). > > There is some detail along these lines at > > http://matplotlib.sourceforge.net/faq/installing_faq.html#what-is-a-backend > > but not the feature-by-feature comparison you suggest. But for WX vs > WXAgg, definitely WXAgg. > It would be really nice to have some info regarding "speed". I don't know if one has to distinguish let's say the time it take to draw a line with 100k points and the "general" felling of interactive responsiveness !? (E.g. I thought that wx was much faster than wxAgg ... just uglier ) - Sebastian Haase
There are no obvious problems with the toolbar icons on my system (Python 2.6.2 32-bit, PyGTK 2.12, PyCairo 1.4.12, GTK 2.12.11, Vista 64-bit). Christoph On 07/11/2009 20:21, John Hunter wrote: > On Sat, Jul 11, 2009 at 6:54 PM, Christoph Gohlke<cg...@uc...> wrote: >> Index: lib/matplotlib/backends/backend_gtk.py >> =================================================================== >> --- lib/matplotlib/backends/backend_gtk.py (revision 7257) >> +++ lib/matplotlib/backends/backend_gtk.py (working copy) >> @@ -1148,7 +1148,7 @@ >> # versions of pygtk, so we have to use a PNG file instead. >> try: >> >> - if gtk.pygtk_version< (2, 8, 0): >> + if gtk.pygtk_version< (2, 8, 0) or sys.platform == 'win32': >> icon_filename = 'matplotlib.png' >> else: >> icon_filename = 'matplotlib.svg' >> > > Thanks, committed. Are there any problems with the toolbar icons on gtk/win32? > > JDH > >
On Sat, Jul 11, 2009 at 7:31 PM, Brian Lewis<bri...@gm...> wrote: > Does there exist any big-picture comparisons of the provided backends? For > example, it would be nice to know what features each backend has or lacks. > It would also be nice to which backends were generally faster...and which > were recommended (WX or WXAgg). There is some detail along these lines at http://matplotlib.sourceforge.net/faq/installing_faq.html#what-is-a-backend but not the feature-by-feature comparison you suggest. But for WX vs WXAgg, definitely WXAgg. JDH
On Sat, Jul 11, 2009 at 6:54 PM, Christoph Gohlke<cg...@uc...> wrote: > > Index: lib/matplotlib/backends/backend_gtk.py > =================================================================== > --- lib/matplotlib/backends/backend_gtk.py (revision 7257) > +++ lib/matplotlib/backends/backend_gtk.py (working copy) > @@ -1148,7 +1148,7 @@ > # versions of pygtk, so we have to use a PNG file instead. > try: > > - if gtk.pygtk_version < (2, 8, 0): > + if gtk.pygtk_version < (2, 8, 0) or sys.platform == 'win32': > icon_filename = 'matplotlib.png' > else: > icon_filename = 'matplotlib.svg' > Thanks, committed. Are there any problems with the toolbar icons on gtk/win32? JDH
Does there exist any big-picture comparisons of the provided backends? For example, it would be nice to know what features each backend has or lacks. It would also be nice to which backends were generally faster...and which were recommended (WX or WXAgg).
Index: lib/matplotlib/backends/backend_gtk.py =================================================================== --- lib/matplotlib/backends/backend_gtk.py (revision 7257) +++ lib/matplotlib/backends/backend_gtk.py (working copy) @@ -1148,7 +1148,7 @@ # versions of pygtk, so we have to use a PNG file instead. try: - if gtk.pygtk_version < (2, 8, 0): + if gtk.pygtk_version < (2, 8, 0) or sys.platform == 'win32': icon_filename = 'matplotlib.png' else: icon_filename = 'matplotlib.svg' --Christoph On 07/11/2009 06:39, John Hunter wrote: > On Mon, Jul 6, 2009 at 9:35 PM, Christoph Gohlke<cg...@uc...> wrote: >> Hi Steve, >> >> matplotlib-0.98.5.3.win32-py2.6.exe was compiled without support for GTK. >> >> If you don't mind trying, I have a build of the matplotlib trunk >> available on my homepage that has GTK support enabled: >> >> http://www.lfd.uci.edu/~gohlke/#pythonlibs >> >> It should work with the PyGTK 2.12 Windows binaries from >> http://www.pygtk.org/downloads.html. >> >> SVG support seems broken: the window.set_icon_from_file() function in >> backend_gtk.py will raise an exception, not recognizing SVG files. The >> PNG icon works. >> > > Christoph: could you look into a patch that uses png for the icon for win32/gtk? > > Thanks, > JDH > >
On Sat, Jul 11, 2009 at 9:05 AM, John Hunter <jd...@gm...> wrote: > > It looks like there is an incompatibility with the freetype supplied > in /sw (probably fink supplied). Perhaps it is not configured as a > universal binary. > > You can build mpl from svn the way we do when we make a release, which > will automatically fetch and build the dependencies correctly. First > see, > > > http://matplotlib.sourceforge.net/faq/installing_faq.html#which-python-for-osx > > then grab a copy of mpl from svn > > http://matplotlib.sourceforge.net/faq/installing_faq.html#install-svn > > and cd into the releases/osx directory and follow the instructions in > the README there. > Hi, I get the same errors when I follow those instructions. I have a very new 17" MacBook Pro running 10.5.7. I've installed the Enthought Python Distribution. These commands worked correctly: unset PKG_CONFIG_PATH make fetch_deps cd bdist_mpkg-0.4.3 sudo python setup.py install cd .. make dependencies cd ../.. python setup.py sdist mv dist/matplotlib-0.98.6svn.tar.gz release/osx/ cd release/osx I then edit the Makefile and change MPLVERSION=0.98.5.3 to MPLVERSION=0.98.6svn but the next command, make installers produces the error: ... < blah blah untarring > ... ============================================================================ BUILDING MATPLOTLIB matplotlib: 0.98.6svn python: 2.5.4 |EPD_Py25 4.3.0| (r254:67916, May 17 2009, 20:07:12) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.3.0 freetype2: found, but unknown version (no pkg-config) OPTIONAL BACKEND DEPENDENCIES libpng: found, but unknown version (no pkg-config) Tkinter: Tkinter: 67737, Tk: 8.4, Tcl: 8.4 wxPython: 2.8.7.1 * WxAgg extension not required for wxPython >= 2.8 Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to "import gtk" in your build/install environment Mac OS X native: yes Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: matplotlib will provide adding pytz OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: /bin/sh: gs: command not found latex: no [Edit setup.cfg to suppress the above messages] ============================================================================ pymods ['pylab'] packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', ' matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo'] running bdist_mpkg installing to build/bdist.macosx-10.3-fat/mpkg running build running build_py creating build creating build/lib.macosx-10.3-fat-2.5 copying lib/pylab.py -> build/lib.macosx-10.3-fat-2.5 creating build/lib.macosx-10.3-fat-2.5/matplotlib ... < blah blah, copying > ... creating build/temp.macosx-10.3-fat-2.5/CXX gcc -DNDEBUG -g -O3 -I/tmp/_py/libraries/usr/local/include -Os -arch ppc -arch i386 -I/Users/mglerner/src/matplotlib/release/osx/zlib-1.2.3 -I/Users/mglerner/src/matplotlib/release/osx/libpng-1.2.33 -I/Users/mglerner/src/matplotlib/release/osx/freetype-2.3.7/include -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API -I/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include -I/usr/local/include -I/usr/include -I/usr/X11R6/include -I. -I/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include/freetype2 -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/X11R6/include/freetype2 -I./freetype2 -I/Library/Frameworks/Python.framework/Versions/4.3.0/include/python2.5 -c src/ft2font.cpp -o build/temp.macosx-10.3-fat-2.5/src/ft2font.o gcc -DNDEBUG -g -O3 -I/tmp/_py/libraries/usr/local/include -Os -arch ppc -arch i386 -I/Users/mglerner/src/matplotlib/release/osx/zlib-1.2.3 -I/Users/mglerner/src/matplotlib/release/osx/libpng-1.2.33 -I/Users/mglerner/src/matplotlib/release/osx/freetype-2.3.7/include -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API -I/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include -I/usr/local/include -I/usr/include -I/usr/X11R6/include -I. -I/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include/freetype2 -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/X11R6/include/freetype2 -I./freetype2 -I/Library/Frameworks/Python.framework/Versions/4.3.0/include/python2.5 -c src/mplutils.cpp -o build/temp.macosx-10.3-fat-2.5/src/mplutils.o gcc -DNDEBUG -g -O3 -I/tmp/_py/libraries/usr/local/include -Os -arch ppc -arch i386 -I/Users/mglerner/src/matplotlib/release/osx/zlib-1.2.3 -I/Users/mglerner/src/matplotlib/release/osx/libpng-1.2.33 -I/Users/mglerner/src/matplotlib/release/osx/freetype-2.3.7/include -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API -I/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include -I/usr/local/include -I/usr/include -I/usr/X11R6/include -I. -I/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include/freetype2 -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/X11R6/include/freetype2 -I./freetype2 -I/Library/Frameworks/Python.framework/Versions/4.3.0/include/python2.5 -c CXX/cxx_extensions.cxx -o build/temp.macosx-10.3-fat-2.5/CXX/cxx_extensions.o gcc -DNDEBUG -g -O3 -I/tmp/_py/libraries/usr/local/include -Os -arch ppc -arch i386 -I/Users/mglerner/src/matplotlib/release/osx/zlib-1.2.3 -I/Users/mglerner/src/matplotlib/release/osx/libpng-1.2.33 -I/Users/mglerner/src/matplotlib/release/osx/freetype-2.3.7/include -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API -I/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include -I/usr/local/include -I/usr/include -I/usr/X11R6/include -I. -I/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include/freetype2 -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/X11R6/include/freetype2 -I./freetype2 -I/Library/Frameworks/Python.framework/Versions/4.3.0/include/python2.5 -c CXX/cxxsupport.cxx -o build/temp.macosx-10.3-fat-2.5/CXX/cxxsupport.o gcc -DNDEBUG -g -O3 -I/tmp/_py/libraries/usr/local/include -Os -arch ppc -arch i386 -I/Users/mglerner/src/matplotlib/release/osx/zlib-1.2.3 -I/Users/mglerner/src/matplotlib/release/osx/libpng-1.2.33 -I/Users/mglerner/src/matplotlib/release/osx/freetype-2.3.7/include -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API -I/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include -I/usr/local/include -I/usr/include -I/usr/X11R6/include -I. -I/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include/freetype2 -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/X11R6/include/freetype2 -I./freetype2 -I/Library/Frameworks/Python.framework/Versions/4.3.0/include/python2.5 -c CXX/IndirectPythonInterface.cxx -o build/temp.macosx-10.3-fat-2.5/CXX/IndirectPythonInterface.o gcc -DNDEBUG -g -O3 -I/tmp/_py/libraries/usr/local/include -Os -arch ppc -arch i386 -I/Users/mglerner/src/matplotlib/release/osx/zlib-1.2.3 -I/Users/mglerner/src/matplotlib/release/osx/libpng-1.2.33 -I/Users/mglerner/src/matplotlib/release/osx/freetype-2.3.7/include -DPY_ARRAYAUNIQUE_SYMBOL=MPL_ARRAY_API -I/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include -I/usr/local/include -I/usr/include -I/usr/X11R6/include -I. -I/Library/Frameworks/Python.framework/Versions/4.3.0/lib/python2.5/site-packages/numpy-1.3.0n1-py2.5-macosx-10.3-fat.egg/numpy/core/include/freetype2 -I/usr/local/include/freetype2 -I/usr/include/freetype2 -I/usr/X11R6/include/freetype2 -I./freetype2 -I/Library/Frameworks/Python.framework/Versions/4.3.0/include/python2.5 -c CXX/cxxextensions.c -o build/temp.macosx-10.3-fat-2.5/CXX/cxxextensions.o g++ -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g -L/usr/local/lib -L/Library/Frameworks/Python.framework/Versions/4.3.0/lib -bundle -undefined dynamic_lookup -arch ppc -arch i386 -L/Users/mglerner/src/matplotlib/release/osx/zlib-1.2.3 -L/Users/mglerner/src/matplotlib/release/osx/libpng-1.2.33 -L/Users/mglerner/src/matplotlib/release/osx/freetype-2.3.7 -Os -arch ppc -arch i386 -I/Users/mglerner/src/matplotlib/release/osx/zlib-1.2.3 -I/Users/mglerner/src/matplotlib/release/osx/libpng-1.2.33 -I/Users/mglerner/src/matplotlib/release/osx/freetype-2.3.7/include build/temp.macosx-10.3-fat-2.5/src/ft2font.o build/temp.macosx-10.3-fat-2.5/src/mplutils.o build/temp.macosx-10.3-fat-2.5/CXX/cxx_extensions.o build/temp.macosx-10.3-fat-2.5/CXX/cxxsupport.o build/temp.macosx-10.3-fat-2.5/CXX/IndirectPythonInterface.o build/temp.macosx-10.3-fat-2.5/CXX/cxxextensions.o -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib -lfreetype -lz -lstdc++ -lm -o build/lib.macosx-10.3-fat-2.5/matplotlib/ft2font.so ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/Python.framework/Versions/4.3.0/lib/libz.dylib, file is not of required architecture ld warning: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libgcc_s.10.4.dylib, missing required architecture ppc in file ld: in /Developer/SDKs/MacOSX10.4u.sdk/Library/Frameworks/Python.framework/Versions/4.3.0/lib/libz.1.dylib, file is not of required architecture for architecture ppc collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/mr/mrDdnQgUEQWRcRe-wF1uFE+++TI/-Tmp-//ccvdMAI3.out (No such file or directory) error: command 'g++' failed with exit status 1 make: *** [installers] Error 1 It appears that I have no idea how the OS X build system works, because I'm quite surprised by all of the seeming references to 10.3 and 10.4, given that I'm running 10.5. I'd be quite happy to provide further information. I'm happy with the stock matplotlib on my system, but I'd like to get this working so I can submit my tiny patch to acorr/xcorr. Thanks, -michael > JDH > > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to 100,000ドル in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Lerner, Ph.D. IRTA Postdoctoral Fellow Laboratory of Computational Biology NIH/NHLBI 5635 Fishers Lane, Room T909, MSC 9314 Rockville, MD 20852 (UPS/FedEx/Reality) Bethesda MD 20892-9314 (USPS)
thanks a lot! Johann John Hunter wrote: > On Sat, Jul 11, 2009 at 1:15 PM, Eric Firing<ef...@ha...> wrote: > >> John Hunter wrote: >> >>> On Thu, Jul 9, 2009 at 9:44 AM, Johann Cohen-Tanugi<co...@lp...> >>> wrote: >>> >>>> Hello, how can I center axis tick labels, so that the labels ends up at >>>> the center between 2 ticks. >>>> >>>> >>> There is no support for this, though you can left or right align a >>> label with a single tick:: >>> >>> for label in ax.xaxis.get_xticklabels(): >>> label.set_horizontalalignment('right') >>> >>> JDH >>> >> Labels for intervals rather than ticks would be nice to have; this is >> commonly used for labeling months or years, for example. I don't have time >> to work on it now, unfortunately. >> >> The best way to fake it with present facilities might be to use no labels on >> the major ticks, place minor ticks half-way between the majors, set their >> lengths to zero, and label them. >> > > > Nice idea, just committed this example to svn as > examples/pylab_examples/centered_ticklabels.py > > import datetime > import numpy as np > import matplotlib > import matplotlib.dates as dates > import matplotlib.ticker as ticker > import matplotlib.pyplot as plt > > # load some financial data; apple's stock price > fh = matplotlib.get_example_data('aapl.npy') > r = np.load(fh); fh.close() > r = r[-250:] # get the last 250 days > > fig = plt.figure() > ax = fig.add_subplot(111) > ax.plot(r.date, r.adj_close) > > ax.xaxis.set_major_locator(dates.MonthLocator()) > ax.xaxis.set_minor_locator(dates.MonthLocator(bymonthday=15)) > > ax.xaxis.set_major_formatter(ticker.NullFormatter()) > ax.xaxis.set_minor_formatter(dates.DateFormatter('%b')) > > for tick in ax.xaxis.get_minor_ticks(): > tick.tick1line.set_markersize(0) > tick.tick2line.set_markersize(0) > tick.label1.set_horizontalalignment('center') > > imid = len(r)/2 > ax.set_xlabel(str(r.date[imid].year)) > plt.show() >
On Sat, Jul 11, 2009 at 1:15 PM, Eric Firing<ef...@ha...> wrote: > John Hunter wrote: >> >> On Thu, Jul 9, 2009 at 9:44 AM, Johann Cohen-Tanugi<co...@lp...> >> wrote: >>> >>> Hello, how can I center axis tick labels, so that the labels ends up at >>> the center between 2 ticks. >>> >> >> There is no support for this, though you can left or right align a >> label with a single tick:: >> >> for label in ax.xaxis.get_xticklabels(): >> label.set_horizontalalignment('right') >> >> JDH > > Labels for intervals rather than ticks would be nice to have; this is > commonly used for labeling months or years, for example. I don't have time > to work on it now, unfortunately. > > The best way to fake it with present facilities might be to use no labels on > the major ticks, place minor ticks half-way between the majors, set their > lengths to zero, and label them. Nice idea, just committed this example to svn as examples/pylab_examples/centered_ticklabels.py import datetime import numpy as np import matplotlib import matplotlib.dates as dates import matplotlib.ticker as ticker import matplotlib.pyplot as plt # load some financial data; apple's stock price fh = matplotlib.get_example_data('aapl.npy') r = np.load(fh); fh.close() r = r[-250:] # get the last 250 days fig = plt.figure() ax = fig.add_subplot(111) ax.plot(r.date, r.adj_close) ax.xaxis.set_major_locator(dates.MonthLocator()) ax.xaxis.set_minor_locator(dates.MonthLocator(bymonthday=15)) ax.xaxis.set_major_formatter(ticker.NullFormatter()) ax.xaxis.set_minor_formatter(dates.DateFormatter('%b')) for tick in ax.xaxis.get_minor_ticks(): tick.tick1line.set_markersize(0) tick.tick2line.set_markersize(0) tick.label1.set_horizontalalignment('center') imid = len(r)/2 ax.set_xlabel(str(r.date[imid].year)) plt.show()
Jae-Joon and John, thank you for your help. Just a few minutes before I read your emails I found a thread in the archives (from a few months back) where Jae-Joon anwered exactly the same question. http://www.nabble.com/legend-bug--td22466216.html#a22466216 Sorry, that I overlooked that last time searched in the archives. 'Scatterpoints=1' did what I needed. Thanks again for your thelp. Cheers OIiver Jae-Joon Lee <lee...@gm...> wrote on 11.07.2009 16:42:29: > From: > > Jae-Joon Lee <lee...@gm...> > > To: > > John Hunter <jd...@gm...> > > Cc: > > Oliver Tomic <oli...@no...>, mat...@li... > > Date: > > 11.07.2009 16:47 > > Subject: > > Re: [Matplotlib-users] problems with numpoints in legend > > The number of points in scatter plot has other keyword argument > (scatterpoints). This is true for svn version, but I'm not quite sure > if it is also true for 0.98.5.2. > Anyhow, the documentation still needs to be updated. > > Regards, > > -JJ > > > On Sat, Jul 11, 2009 at 9:46 AM, John Hunter<jd...@gm...> wrote: > > On Mon, Jul 6, 2009 at 6:06 AM, Oliver Tomic<oli...@no...> wrote: > >> Hi, > >> > >> Windows XP > >> Python 2.5.2 > >> matplotlib 0.98.5.2 > >> > >> I try to use numpoints for a legend my plot, but without luck. I always end > >> up having three points in the legend despite setting numpoints=1 (see below > >> towards the end of the code). > >> Things work nicely though in a much simpler script. > >> > >> Help is greatly appreciated. > > > > When posting an example, it helps if we can run it:-) In this case, > > we would need your data files > > > > assC = np.loadtxt('Apples_flowerFlavour_assC_corrPlot.txt') > > all = np.loadtxt('Apples_flowerFlavour_allAssessors_corrPlot.txt') > > > > JDH > > > > > ------------------------------------------------------------------------------ > > Enter the BlackBerry Developer Challenge > > This is your chance to win up to 100,000ドル in prizes! For a limited time, > > vendors submitting new applications to BlackBerry App World(TM) will have > > the opportunity to enter the BlackBerry Developer Challenge. See full prize > > details at: http://p.sf.net/sfu/Challenge > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > ------------------------------------------------------------------------------ > Enter the BlackBerry Developer Challenge > This is your chance to win up to 100,000ドル in prizes! For a limited time, > vendors submitting new applications to BlackBerry App World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. See full prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
John Hunter wrote: > On Thu, Jul 9, 2009 at 9:44 AM, Johann Cohen-Tanugi<co...@lp...> wrote: >> Hello, how can I center axis tick labels, so that the labels ends up at >> the center between 2 ticks. >> > > There is no support for this, though you can left or right align a > label with a single tick:: > > for label in ax.xaxis.get_xticklabels(): > label.set_horizontalalignment('right') > > JDH Labels for intervals rather than ticks would be nice to have; this is commonly used for labeling months or years, for example. I don't have time to work on it now, unfortunately. The best way to fake it with present facilities might be to use no labels on the major ticks, place minor ticks half-way between the majors, set their lengths to zero, and label them. Eric
On Sat, Jul 11, 2009 at 9:55 AM, Eli Brosh<eb...@gm...> wrote: > Thanks John, > A kwarg fillstyle with options 'full|top|bottom|left|right' for any marker > is certainly better than what i have done. > I just did not have an idea how to program this kwarg. > Further, I can't see an easy way of generalizing the half-filling of > markers. > is there a better way than just programming each half-filled marker > separately ? > Perhaps if you can give me some hints, I can try to do the rest of the work. Sure, first take a look at the coding guide, in particular these two sections which introduce kwarg processing and documentation conventions. http://matplotlib.sourceforge.net/devel/coding_guide.html#keyword-argument-processing http://matplotlib.sourceforge.net/devel/coding_guide.html#documentation-and-docstrings Basically, any new "property", where I use quotes because mpl properties are not the same as python properties, needs a setter and getter. The setter must also have an ACCEPTS flag, which gives the acceptable arguments. mpl uses these in the setp and getp introspection facilities, as well as in the auto-table building of kwargs in the docs. The artist.ArtistInspector is used to insepct the functions and docs to extract the properties: http://matplotlib.sourceforge.net/api/artist_api.html#matplotlib.artist.ArtistInspector I've committed a patch to svn that implements the fillstyle property for Line2D, and implemented it for draw_square. The other filled markers raise a NotImplementedError if the fillstyle is not 'full', and that is where you come in. The basic implementation is to draw two half markers, one filled and one unfilled, and use the rotation property of the transformation to support the various left|right|bottom|top. Here is the reference implementation for draw_square:: def _draw_square(self, renderer, gc, path, path_trans): gc.set_snap(renderer.points_to_pixels(self._markersize) >= 2.0) side = renderer.points_to_pixels(self._markersize) transform = Affine2D().translate(-0.5, -0.5).scale(side) rgbFace = self._get_rgb_face() fs = self.get_fillstyle() if fs=='full': renderer.draw_markers(gc, Path.unit_rectangle(), transform, path, path_trans, rgbFace) else: # build a bottom filled square out of two rectangles, one # filled. Use the rotation to support left, right, bottom # or top if fs=='bottom': rotate = 0. elif fs=='top': rotate = 180. elif fs=='left': rotate = 270. else: rotate = 90. bottom = Path([[0.0, 0.0], [1.0, 0.0], [1.0, 0.5], [0.0, 0.5], [0.0, 0.0]]) top = Path([[0.0, 0.5], [1.0, 0.5], [1.0, 1.0], [0.0, 1.0], [0.0, 0.05]]) transform = transform.rotate_deg(rotate) renderer.draw_markers(gc, bottom, transform, path, path_trans, rgbFace) renderer.draw_markers(gc, top, transform, path, path_trans, None) See examples/pylab_examples/fillstyle_demo.py in svn, and the attached patch (although this is already committed, it might be instructional so you can see the steps needed to add a new property). When you finish the others, send along an svn diff and some more examples in the fillstyle_demo and I'll commit it. Thanks! JDH
My version is 0.98.3 This is what comes with ubuntu intrepid. I will try to upgrade from svn. Eli On Sat, Jul 11, 2009 at 4:15 PM, John Hunter <jd...@gm...> wrote: > On Sat, Jul 11, 2009 at 6:06 AM, Eli Brosh<eb...@gm...> wrote: > > Hello, > > I encountered a problem when trying to draw a legend outside the axes. > > For some reason, when the legend is placed outside the axes, the markers > are > > not drawn near the labels. > > > > I attach two scripts and two corresponding figures. > > the only differences between the scripts is the location of the legend. > > When the legend is placed inside the axes, everything is OK. > > However, when the legend is outside the markers are gone. > > > > Is this a bug ? > > Is there a way around it ? > > I am not seeing this problem in mpl svn (what version are you using). > perhaps you can upgrade to svn? > > http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn > > JDH >