customised linestyle?

Dear all,

Is it possible to have a customized linestyle for line plots?
such as I want ‘–.--.–.’ or ‘---*’ or others.

I read the documentation part of `set_drawstyle and a post here:

http://old.nabble.com/Changing-the-Dash-Spacing–td33381003.html#a33381003

but still not clear. Could anyone give a very small example?

thanks et cheers,

Chao
`

···


Chao YUE
Laboratoire des Sciences du Climat et de l’Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex

Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16


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 <chaoyuejoy@…287…> wrote:


Chao YUE
Laboratoire des Sciences du Climat et de l’Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex

Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16


Dear all,

Is it possible to have a customized linestyle for line plots?
such as I want ‘–.--.–.’ or ‘---*’ or others.

I read the documentation part of `set_drawstyle and a post here:

http://old.nabble.com/Changing-the-Dash-Spacing–td33381003.html#a33381003

but still not clear. Could anyone give a very small example?

thanks et cheers,

Chao
`


Live Security Virtual Conference

Exclusive live event will cover all the ways today’s security and

threat landscape has changed and how IT managers can respond. Discussions

will include endpoint security, mobile security and the latest in malware

threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

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
linestyles. because my data are quite dense, so I guess if I want to use this way, I need to sample the data by a proper interval
to have this effect. which is also nice, for sure.

cheers,

Chao

2012/5/8 Pengkui Luo <pengkui.luo@…287…>

···

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 <chaoyuejoy@…287…> wrote:


Chao YUE
Laboratoire des Sciences du Climat et de l’Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex

Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16


Dear all,

Is it possible to have a customized linestyle for line plots?
such as I want ‘–.--.–.’ or ‘---*’ or others.

I read the documentation part of `set_drawstyle and a post here:

http://old.nabble.com/Changing-the-Dash-Spacing–td33381003.html#a33381003

but still not clear. Could anyone give a very small example?

thanks et cheers,

Chao
`


Live Security Virtual Conference

Exclusive live event will cover all the ways today’s security and

threat landscape has changed and how IT managers can respond. Discussions

will include endpoint security, mobile security and the latest in malware

threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Chao YUE
Laboratoire des Sciences du Climat et de l’Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex

Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16