[Matplotlib-users] control dash line spacing by rc parameters?

2012-05-07 Thread Chao YUE
Dear all, I guess Is it not possible to control dash line spacing by set rcParam? cheers, Chao -- *** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment

[Matplotlib-users] Possible bug with saving eps figure

2012-05-07 Thread Filipe Pires Alvarenga Fernandes
Hi, this is not a big deal, but I think that there is a bug while saving eps figures and passing the linewidth='2.5' as string instead of float. The following reproduces the error I get here: plt.plot([1,2,3], 'k', linewidth='2.5') plt.savefig('teste.png') # Saves OK # The following fails with

Re: [Matplotlib-users] Possible bug with saving eps figure

2012-05-07 Thread Michael Droettboom
That's not a bug. linewidth is required to be a float, rather than a string. Python's typing is generally a little stricter than languages such as JavaScript. Mike On 05/07/2012 12:14 PM, Filipe Pires Alvarenga Fernandes wrote: Hi, this is not a big deal, but I think that there is a bug

Re: [Matplotlib-users] Possible bug with saving eps figure

2012-05-07 Thread Benjamin Root
On Mon, May 7, 2012 at 12:55 PM, Michael Droettboom md...@stsci.edu wrote: That's not a bug. linewidth is required to be a float, rather than a string. Python's typing is generally a little stricter than languages such as JavaScript. Mike I think the bigger question is why does it _work_

Re: [Matplotlib-users] Possible bug with saving eps figure

2012-05-07 Thread Filipe Pires Alvarenga Fernandes
Yep, that's what I was expecting. It should fail with both show() and the save as 'png' format. However, it only fails when trying to save an 'eps' -Filipe On Mon, May 7, 2012 at 1:12 PM, Benjamin Root ben.r...@ou.edu wrote: On Mon, May 7, 2012 at 12:55 PM, Michael Droettboom md...@stsci.edu

Re: [Matplotlib-users] control dash line spacing by rc parameters?

2012-05-07 Thread Pengkui Luo
Hi Chao, Does this work for you? http://old.nabble.com/Setting-dash-size-and-gap-of-dashed-line-in-matplotlib-td27386453.html ~Pengkui 2012/5/7 Chao YUE chaoyue...@gmail.com Dear all, I guess Is it not possible to control dash line spacing by set rcParam? cheers, Chao --

Re: [Matplotlib-users] customised linestyle?

2012-05-07 Thread Pengkui Luo
See the API document of plot(): http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.plot You may try different combinations of linestyle and marker to achieve your desired style. ~Pengkui On Fri, May 4, 2012 at 10:39 AM, Chao YUE chaoyue...@gmail.com wrote: Dear all,

Re: [Matplotlib-users] control dash line spacing by rc parameters?

2012-05-07 Thread Chao YUE
Yes. it works fine. The only problem is that I would like to set my default spacing for dashed line, which I guess might need rcParams. In [1]: line,=plot(range(10),'--') In [2]: line.set_dashes((5,2)) In [4]: line._dashSeq Out[4]: (5, 2) so the _dashSeq is a private attribute and cannot be

Re: [Matplotlib-users] customised linestyle?

2012-05-07 Thread Chao YUE
Hi Pengkui, I guess you're referring to something like: In [15]: plot(np.arange(0,100,2),'D-',color='k',ms=3) Out[15]: [matplotlib.lines.Line2D at 0xbaaba8c] then it looks like it's a linestyle, but actually it's a combination of marker and line, unlike the dash '--' or dots ':' which are pure