[Matplotlib-users] pdf/eps export; dotted line plot shows random markers on the line

2012-06-09 Thread Benjamin Jonen
Hey everybody,

I am trying to create a simple plot with a dotted line. However,
depending on the export format I use, I get random markers on the
line. This effect appears for pdf but not for png. When I use eps and
convert the eps file to pdf I also receive the random markers.

I use the following script to generate the plot. The resulting graph
on my system is attached to this mail.

#!/usr/bin/env python
import numpy as np
a = np.linspace(0.,10.,100)
b = np.sqrt(a)
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111)
fig.add_subplot(ax)
ax.plot(a, b, linestyle = ':', color = 'k', linewidth = 3)
fig.savefig('broken.pdf')

My system is:

Linux  3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012
x86_64 x86_64 x86_64 GNU/Linux

I am using matplotlib version '1.1.0'.

Any help is greatly appreciated.
Benjamin


broken.pdf
Description: Adobe PDF document
--
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


Re: [Matplotlib-users] pdf/eps export; dotted line plot shows random markers on the line

2012-06-09 Thread Dale Chayes
No extra "stuff" in the png and pdf plots in my case (changed the hash-bang 
line):

Mac  10.7.4 w/  python and matplotlib from (not too recent) Fink:
 i   python27 1:2.7.2-5Interpreted, object-oriented language
 i   python27-shlibs  1:2.7.2-5Interpreted, object-oriented language
 i   matplotlib-base  1.0.2-1  Plot data on map projections with matplotlib
 i   matplotlib-py27  1.1.0-2  Pure python 2D plotting with a Matlab syntax

-Dale



On Jun 9, 2012, at 13:00 , Benjamin Jonen wrote:

> Hey everybody,
> 
> I am trying to create a simple plot with a dotted line. However,
> depending on the export format I use, I get random markers on the
> line. This effect appears for pdf but not for png. When I use eps and
> convert the eps file to pdf I also receive the random markers.
> 
> I use the following script to generate the plot. The resulting graph
> on my system is attached to this mail.
> 
> #!/usr/bin/env python
> import numpy as np
> a = np.linspace(0.,10.,100)
> b = np.sqrt(a)
> import matplotlib
> matplotlib.use('Agg')
> import matplotlib.pyplot as plt
> fig = plt.figure()
> ax = fig.add_subplot(111)
> fig.add_subplot(ax)
> ax.plot(a, b, linestyle = ':', color = 'k', linewidth = 3)
> fig.savefig('broken.pdf')
> 
> My system is:
> 
> Linux  3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012
> x86_64 x86_64 x86_64 GNU/Linux
> 
> I am using matplotlib version '1.1.0'.
> 
> Any help is greatly appreciated.
> Benjamin
> --
> 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


--
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


Re: [Matplotlib-users] pdf/eps export; dotted line plot shows random markers on the line

2012-06-09 Thread Jerzy Karczmarczuk
Benjamin Jonen:
> I get random markers on the
> line. This effect appears for pdf but not for png. When I use eps and
> convert the eps file to pdf I also receive the random markers.
> ...
For me your PDF is OK, nothing "broken". I get exactly the same (mpl 
1.1.0, on Windows XP, Python 2.7).
Your problem has probably nothing to do with matplotlib...

Jerzy Karczmarczuk



--
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