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
(38) |
2
(31) |
3
(9) |
4
(13) |
5
(24) |
6
(11) |
7
(8) |
8
(14) |
9
(7) |
10
(4) |
11
(7) |
12
(11) |
13
(16) |
14
(19) |
15
(11) |
16
(9) |
17
(3) |
18
(4) |
19
(47) |
20
(28) |
21
(9) |
22
(9) |
23
(11) |
24
|
25
|
26
(12) |
27
(22) |
28
(20) |
29
(16) |
30
(19) |
|
i want to display the value for each date , now i have 3 date value , but in chart it cannot show the value, in chart can show 12,45,67 Thanks source figure(2) x=[4,5,6] y=[12,45,67] line,= plt.plot(x,y,label="aaa",color="red",linewidth=1,linestyle='|dashed', marker='o',c='b') xticks(arange(13), calendar.month_name[0:13], rotation=11) plt.ylabel("WDR",fontsize=12, color='r') plt.title("Price",fontsize=16, color='r') plt.xlim(1,12) plt.ylim(1,100,1) plt.grid(True) plt.legend() -- View this message in context: http://old.nabble.com/how-to-display-value-for-each-date-in-line-chart-or-pie-chart--%28show-y-axis%27s-value%29-tp28406803p28406803.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Those Computer Modern fonts (specifically the Bakoma distribution of them that matplotlib includes) use a custom character set mapping where many of the characters are in completely arbitrary locations. For regular text, matplotlib expects a regular Unicode font (particularly to get the minus sign). Since cmr10 doesn't have a standard encoding, it just won't work. You could get around this by overriding the default formatter to use a different symbol for the minus sign. See this example for an example of overriding the formatter: http://matplotlib.sourceforge.net/examples/pylab_examples/major_minor_demo1.html#pylab-examples-major-minor-demo1 Mike On 04/29/2010 03:33 PM, Tony S Yu wrote: > There was a recent thread about the font sizes > <http://old.nabble.com/mathtext-is-smaller-than-regular-text-ts28374364.html> not > matching up between regular text and math text. I decided I'd try to > get matching font sizes by using computer modern as the default font, > so I added the following to my matplotlibrc file: > > font.family: serif > font.serif: cmr10 > > This fixes the font size issue, but for some reason, MPL's minus sign > seems to be using a character not defined by the computer modern fonts > (see y-axis in attached image). > > Is there a fix for this missing character? > > Best, > -Tony > > P.S. I'm using the cmr10 fonts provided by MPL (confirmed by using the > findfont function). > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
melloncx wrote: > Hello, > > I am quite new in matplotlib, I am now facing a quite simple problem but > have no idea to solve. I just want set the y axis scale to value 100, which > means in the image, the y axis is always of scale 100, because the points in > my image indicates the percentage value(for example, 20%, 87%) which will > never exceed 100. > > So, How to set the y axis scale to constant value 100 ?? It's really hard to > find a answer from internet. If you are using the pyplot interface, then maybe what you want is the ylim function: http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.ylim Eric
Hi there I found that the error is related to legend! If I disable self.plotaxes.legend(bbox_to_anchor=(0.95, 0.95), loc=2, prop=FontProperties(size='small'),numpoints=1) I can change the linestyles and it works like a charm, but if I turn on that line again... just errors. can anyone think of something? best Carlos On Wed, Apr 28, 2010 at 09:46, Michael Droettboom <md...@st...> wrote: > I can't reproduce the error on 0.99. Can you provide a complete script that > reproduces the error? > > Mike > > Carlos Grohmann wrote: >> >> I've been trying to change the linestyles in a LineCollection, but >> without any success... >> >> If I'm using: >> col = collections.LineCollection(listXY, linewidths=circwdt, >> colors=circcol, linestyle='solid', label=plabel) >> >> it works fine, but anything other than 'solid' gives me an error when >> the code calls FigureCanvasAgg.draw(self) (it is a wxpython app): >> >> Traceback (most recent call last): >> File "/home/guano/Arbeit/Stout/StereoPanel.py", line 552, in PlotChecked >> self.stereoCanvas.draw() >> File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_wxagg.py", >> line 59, in draw >> FigureCanvasAgg.draw(self) >> File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py", >> line 314, in draw >> self.figure.draw(self.renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, >> in draw_wrapper >> draw(artist, renderer, *kl) >> File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 774, in >> draw >> for a in self.axes: a.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, >> in draw_wrapper >> draw(artist, renderer, *kl) >> File "/usr/lib/pymodules/python2.6/matplotlib/axes.py", line 1721, in >> draw >> a.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, >> in draw_wrapper >> draw(artist, renderer, *kl) >> File "/usr/lib/pymodules/python2.6/matplotlib/legend.py", line 386, in >> draw >> self._legend_box.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 224, in >> draw >> c.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 224, in >> draw >> c.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 224, in >> draw >> c.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 224, in >> draw >> c.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 488, in >> draw >> c.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, >> in draw_wrapper >> draw(artist, renderer, *kl) >> File "/usr/lib/pymodules/python2.6/matplotlib/lines.py", line 535, in >> draw >> drawFunc(renderer, gc, tpath, affine.frozen()) >> File "/usr/lib/pymodules/python2.6/matplotlib/lines.py", line 874, >> in _draw_lines >> self._lineFunc(renderer, gc, path, trans) >> File "/usr/lib/pymodules/python2.6/matplotlib/lines.py", line 925, >> in _draw_dashed >> renderer.draw_path(gc, path, trans) >> File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py", >> line 98, in draw >> _path >> self._renderer.draw_path(gc, path, transform, rgbFace) >> TypeError: float() argument must be a string or a number >> >> >> >> >From the MPL docs, I see that i should be able to use other linestyles: >> >> >> http://matplotlib.sourceforge.net/api/collections_api.html#matplotlib.collections.LineCollection >> >> linestyles [ ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ] >> a string or dash tuple. The dash tuple is: >> >> >> >> I'm using MPL 0.99.0 in Ubuntu Karmic (9.10) >> >> tks >> >> >> > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > -- Prof. Carlos Henrique Grohmann - Geologist D.Sc. Institute of Geosciences - Univ. of São Paulo, Brazil http://www.igc.usp.br/pessoais/guano Linux User #89721 ________________ Can’t stop the signal.
There was a recent thread about the font sizes not matching up between regular text and math text. I decided I'd try to get matching font sizes by using computer modern as the default font, so I added the following to my matplotlibrc file: font.family: serif font.serif: cmr10 This fixes the font size issue, but for some reason, MPL's minus sign seems to be using a character not defined by the computer modern fonts (see y-axis in attached image). Is there a fix for this missing character? Best, -Tony P.S. I'm using the cmr10 fonts provided by MPL (confirmed by using the findfont function).
You can set the rcParam svg.embed_char_paths to False. Mike On 04/29/2010 01:43 PM, Ariel Rokem wrote: > Hi everyone, > > Is there any way to get a svg output of a matplotlib, with the fonts > not embedded as vector graphic? That is, is there any way to make a > figure, such that a vector image editing program (such as Adobe > Illustrator) would recognize the text as text and would allow editing > of the text, changing the font and resizing the font size? > > Cheers, > > Ariel > > -- > Ariel Rokem > Helen Wills Neuroscience Institute > University of California, Berkeley > http://argentum.ucbso.berkeley.edu/ariel > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Hi everyone, Is there any way to get a svg output of a matplotlib, with the fonts not embedded as vector graphic? That is, is there any way to make a figure, such that a vector image editing program (such as Adobe Illustrator) would recognize the text as text and would allow editing of the text, changing the font and resizing the font size? Cheers, Ariel -- Ariel Rokem Helen Wills Neuroscience Institute University of California, Berkeley http://argentum.ucbso.berkeley.edu/ariel
Hi, I have tried to make a plot using the twinx() method to get different left and right scales in the same plot. The plot looks fine, but the y labels end up outside the figure. The same problem can be seen in the example from the matplot homepage: http://matplotlib.sourceforge.net/examples/api/two_scales.html Here the y labels 'exp' and 'sin' are outside the plot. Does anyone know a good fix for this? Preferably one which doesn't involve manual resizing? I use ipython with -pylab to generate the plots. Best regards, Jóan Petur -- View this message in context: http://old.nabble.com/Labels-end-up-outside-figure-tp28402985p28402985.html Sent from the matplotlib - users mailing list archive at Nabble.com.
I don't see this here (on the wx Buttons in the mathtext_wx.py example, at least). What are you using to display this bitmap? It may be a premultiplied/nonpremultiplied alpha problem. Are you using the code I attached, or setting the red channel to the text image as well? Mike On 04/29/2010 12:19 PM, Cédrick FAURY wrote: > Thank you for your answer, Mike. > > It works fine, but I don't understand why there is grey points around > the letters ... (see attached image) > > > Cédrick > > Le 29/04/2010 15:17, Michael Droettboom a écrit : >> There is no direct way, but since you can get a numpy array of the >> text bitmap, you can do whatever modifications you want to it. For >> example, the following is a modification of the mathtext_to_wxbitmap >> function in mathtext_wx that takes an rgb tuple as an argument: >> >> def mathtext_to_wxbitmap(s, rgb): >> ftimage, depth = mathtext_parser.parse(s, 150) >> x = ftimage.as_array() >> # Create an RGBA array for the destination, w x h x 4 >> rgba = np.zeros((x.shape[0], x.shape[1], 4), dtype=np.uint8) >> # set the RGB components to the constant value passed in >> rgba[:,:,0:3] = rgb >> # set the A component to the shape of the text >> rgba[:,:,3] = x >> >> return wx.BitmapFromBufferRGBA( >> ftimage.get_width(), ftimage.get_height(), >> rgba.tostring()) >> >> Mike >> >> On 04/29/2010 02:28 AM, Cédrick FAURY wrote: >>> Hello, >>> >>> Is it possible to get colored bitmaps (instead of black ones) with the >>> MathTextParser when it is used as shown in the mathtext_wx.py >>> example ?? >>> >>> Thanks by advance for your help. >>> >>> Best regards, >>> Cédrick FAURY >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >
That is indeed a bug. This has now been fixed in SVN r8288. You can apply this patch to your local copy if you aren't running from SVN: http://matplotlib.svn.sourceforge.net/viewvc/matplotlib?view=rev&revision=8288 Mike On 04/28/2010 09:29 PM, Shrividya Ravi wrote: > Hi all, > I am having a problem having both a vspan and a legend in a figure > plotted on a semilog axis. A simple code that gives the following > error is shown in red: > > ERROR > > return self.frozen().__array__() > File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line > 1051, in __array__ > return self.frozen().__array__() > File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line > 1706, in frozen > return blended_transform_factory(self._x.frozen(), self._y.frozen()) > File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line > 1875, in frozen > frozen = composite_transform_factory(self._a.frozen(), > self._b.frozen()) > File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line > 1367, in frozen > return Affine2D(self.get_matrix().copy()) > File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line > 1451, in __init__ > Affine2DBase.__init__(self) > File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line > 1304, in __init__ > Transform.__init__(self) > File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line > 87, in __init__ > self._parents = WeakKeyDictionary() > File "/usr/lib/python2.6/weakref.py", line 232, in __init__ > def remove(k, selfref=ref(self)): > RuntimeError: maximum recursion depth exceeded while calling a Python > object > > CODE > > x = numpy.arange(10,1e8,1000) > y = numpy.arange(0,100,0.001) > > pylab.semilogx(x,y,'bo', label="Plot 1") > > pylab.legend(loc='best') > pylab.axvspan(20,2e3,facecolor='k',alpha0.2) > > > > > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Thank you Matthias :) I think the problem here is that I never found an example showing 'twin' scales, so I botched it to get the same result! Cheers James
Below is the working code to plot two different data series with different units on the same graph, with the same x co-ordinates: import pylab # generate some data x = range(0, 10) y1 = [i*i for i in x] y2 = [pylab.sin(0.4*i) for i in x] # the data share x axis but have different y units figure = pylab.gcf() # Get the current figure orig_axis = pylab.gca() # Get the current axis orig_axis.set_axis_off() # Turn it off to avoid complications # use this for the overlapping axes box = [0.14, 0.14, 0.72, 0.72] # This uses the first set of data axis1 = figure.add_axes(box, label = 'axis1') axis1.set_title('TITLE') axis1.plot(x, y1, '-^y') axis1.set_ylabel('AXIS 1 LABEL') axis1.set_xlabel('SHARED X LABEL') axis1.spines['right'].set_visible(False) # This uses the second set of data # Note the same box region is used but the label must be different axis2 = figure.add_axes(box, label = 'axis2') axis2.plot(x, y2, '-sb') axis2.yaxis.set_ticks_position('right') axis2.yaxis.set_label_position('right') axis2.set_ylabel('AXIS 2 LABEL') axis2.spines['bottom'].set_visible(False) axis2.spines['top'].set_visible(False) axis2.spines['left'].set_visible(False) # Write out to a file pylab.savefig('out.png', dpi = 100, transparent = True) Issues: 1) I can't use show() in this case because there is no Transparent parameter. 2) It's still a botch. 3) I tried using alpha but it didn't seem to work at all? Does anyone have a better implementation of this or better ideas? Many thanks James
Hello, Is it possible to get colored bitmaps (instead of black ones) with the MathTextParser when it is used as shown in the mathtext_wx.py example ?? Thanks by advance for your help. Best regards, Cédrick FAURY
Here. I found out that if I use from pylab import * as in the example, it works. But in my app, I'm using import wx import matplotlib from matplotlib.figure import Figure from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg from matplotlib.font_manager import fontManager, FontProperties from matplotlib.collections import LineCollection could that be the culprit? Carlos script: from pylab import * import numpy as np from matplotlib.collections import LineCollection # We need to set the plot limits, the will not autoscale ax = axes() ax.set_xlim((-1,1)) ax.set_ylim((-1,1)) strike = [0,45,90,135] dip = [10,20,30,40] listXY = [] for i in range(len(strike)): beta = np.radians(strike[i]) phi = np.radians(np.arange(-90,92,2)) lamb = np.radians((90 - dip[i])) alpha = np.arccos(np.cos(phi) * np.cos(lamb)) tq = np.sqrt(2) * np.sin(alpha/2) sint = np.sin(phi) / np.sin(alpha) temps = 1 - (sint * sint) x = tq * np.sqrt(temps) y = tq * sint x1 = np.cos(beta) * x + np.sin(beta) * y y1 = -np.sin(beta) * x + np.cos(beta) * y listXY.append(zip(x1,y1)) col = LineCollection(listXY, linewidths=1, colors='red', linestyles = 'dotted') ax.add_collection(col, autolim=True) show() On Wed, Apr 28, 2010 at 09:46, Michael Droettboom <md...@st...> wrote: > I can't reproduce the error on 0.99. Can you provide a complete script that > reproduces the error? > > Mike > > Carlos Grohmann wrote: >> >> I've been trying to change the linestyles in a LineCollection, but >> without any success... >> >> If I'm using: >> col = collections.LineCollection(listXY, linewidths=circwdt, >> colors=circcol, linestyle='solid', label=plabel) >> >> it works fine, but anything other than 'solid' gives me an error when >> the code calls FigureCanvasAgg.draw(self) (it is a wxpython app): >> >> Traceback (most recent call last): >> File "/home/guano/Arbeit/Stout/StereoPanel.py", line 552, in PlotChecked >> self.stereoCanvas.draw() >> File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_wxagg.py", >> line 59, in draw >> FigureCanvasAgg.draw(self) >> File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py", >> line 314, in draw >> self.figure.draw(self.renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, >> in draw_wrapper >> draw(artist, renderer, *kl) >> File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 774, in >> draw >> for a in self.axes: a.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, >> in draw_wrapper >> draw(artist, renderer, *kl) >> File "/usr/lib/pymodules/python2.6/matplotlib/axes.py", line 1721, in >> draw >> a.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, >> in draw_wrapper >> draw(artist, renderer, *kl) >> File "/usr/lib/pymodules/python2.6/matplotlib/legend.py", line 386, in >> draw >> self._legend_box.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 224, in >> draw >> c.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 224, in >> draw >> c.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 224, in >> draw >> c.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 224, in >> draw >> c.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 488, in >> draw >> c.draw(renderer) >> File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, >> in draw_wrapper >> draw(artist, renderer, *kl) >> File "/usr/lib/pymodules/python2.6/matplotlib/lines.py", line 535, in >> draw >> drawFunc(renderer, gc, tpath, affine.frozen()) >> File "/usr/lib/pymodules/python2.6/matplotlib/lines.py", line 874, >> in _draw_lines >> self._lineFunc(renderer, gc, path, trans) >> File "/usr/lib/pymodules/python2.6/matplotlib/lines.py", line 925, >> in _draw_dashed >> renderer.draw_path(gc, path, trans) >> File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py", >> line 98, in draw >> _path >> self._renderer.draw_path(gc, path, transform, rgbFace) >> TypeError: float() argument must be a string or a number >> >> >> >> >From the MPL docs, I see that i should be able to use other linestyles: >> >> >> http://matplotlib.sourceforge.net/api/collections_api.html#matplotlib.collections.LineCollection >> >> linestyles [ ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ] >> a string or dash tuple. The dash tuple is: >> >> >> >> I'm using MPL 0.99.0 in Ubuntu Karmic (9.10) >> >> tks >> >> >> > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA > > -- Prof. Carlos Henrique Grohmann - Geologist D.Sc. Institute of Geosciences - Univ. of São Paulo, Brazil http://www.igc.usp.br/pessoais/guano Linux User #89721 ________________ Can’t stop the signal.
Hi all, I am having a problem having both a vspan and a legend in a figure plotted on a semilog axis. A simple code that gives the following error is shown in red: ERROR return self.frozen().__array__() File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line 1051, in __array__ return self.frozen().__array__() File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line 1706, in frozen return blended_transform_factory(self._x.frozen(), self._y.frozen()) File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line 1875, in frozen frozen = composite_transform_factory(self._a.frozen(), self._b.frozen()) File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line 1367, in frozen return Affine2D(self.get_matrix().copy()) File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line 1451, in __init__ Affine2DBase.__init__(self) File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line 1304, in __init__ Transform.__init__(self) File "/usr/lib/pymodules/python2.6/matplotlib/transforms.py", line 87, in __init__ self._parents = WeakKeyDictionary() File "/usr/lib/python2.6/weakref.py", line 232, in __init__ def remove(k, selfref=ref(self)): RuntimeError: maximum recursion depth exceeded while calling a Python object CODE x = numpy.arange(10,1e8,1000) y = numpy.arange(0,100,0.001) pylab.semilogx(x,y,'bo', label="Plot 1") pylab.legend(loc='best') pylab.axvspan(20,2e3,facecolor='k',alpha0.2)