SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: andes <czu...@ya...> - 2010年12月15日 16:46:43
hello,
When I save as an "eps" a figure created by matplotlib I face the problem
that the inclined lines in the plot appear to be jagged when I open the
"eps" (please see figure below). This problem doesn't appear when I save the
figure as a pdf or png. Do you you know if there is a simple solution to
this problem that I can implement in my example code (shown below)?
I would greatly appreciate any advice. 
#----example code
from numpy import *
from pylab import *
x=linspace(-1,1,100)
y=x
figure(1)
p1,=plot(x,y,lw=3)
savefig("figeps.eps")
#---jagged line in plot
http://old.nabble.com/file/p30465591/jagged.png 
-- 
View this message in context: http://old.nabble.com/jagged-line-in-eps-from-matplitlib-tp30465591p30465591.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jae-Joon L. <lee...@gm...> - 2010年12月19日 04:36:59
Can you post your eps file?
This may be related to the ps rasterizer you're using.
Regards,
-JJ
On Thu, Dec 16, 2010 at 1:46 AM, andes <czu...@ya...> wrote:
>
> hello,
>
> When I save as an "eps" a figure created by matplotlib I face the problem
> that the inclined lines in the plot appear to be jagged when I open the
> "eps" (please see figure below). This problem doesn't appear when I save the
> figure as a pdf or png. Do you you know if there is a simple solution to
> this problem that I can implement in my example code (shown below)?
> I would greatly appreciate any advice.
> #----example code
> from numpy import *
> from pylab import *
> x=linspace(-1,1,100)
> y=x
> figure(1)
> p1,=plot(x,y,lw=3)
> savefig("figeps.eps")
> #---jagged line in plot
> http://old.nabble.com/file/p30465591/jagged.png
>
> --
> View this message in context: http://old.nabble.com/jagged-line-in-eps-from-matplitlib-tp30465591p30465591.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: andes <czu...@ya...> - 2010年12月19日 23:53:50
Hello JJ,
Thanks so much for replying..
I have attached the "eps" file.
http://old.nabble.com/file/p30495318/figeps.eps figeps.eps 
c
Jae-Joon Lee wrote:
> 
> Can you post your eps file?
> This may be related to the ps rasterizer you're using.
> Regards,
> 
> -JJ
> 
> 
> On Thu, Dec 16, 2010 at 1:46 AM, andes <czu...@ya...> wrote:
>>
>> hello,
>>
>> When I save as an "eps" a figure created by matplotlib I face the problem
>> that the inclined lines in the plot appear to be jagged when I open the
>> "eps" (please see figure below). This problem doesn't appear when I save
>> the
>> figure as a pdf or png. Do you you know if there is a simple solution to
>> this problem that I can implement in my example code (shown below)?
>> I would greatly appreciate any advice.
>> #----example code
>> from numpy import *
>> from pylab import *
>> x=linspace(-1,1,100)
>> y=x
>> figure(1)
>> p1,=plot(x,y,lw=3)
>> savefig("figeps.eps")
>> #---jagged line in plot
>> http://old.nabble.com/file/p30465591/jagged.png
>>
>> --
>> View this message in context:
>> http://old.nabble.com/jagged-line-in-eps-from-matplitlib-tp30465591p30465591.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Lotusphere 2011
>> Register now for Lotusphere 2011 and learn how
>> to connect the dots, take your collaborative environment
>> to the next level, and enter the era of Social Business.
>> http://p.sf.net/sfu/lotusphere-d2d
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
> 
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://old.nabble.com/jagged-line-in-eps-from-matplitlib-tp30465591p30495318.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jae-Joon L. <lee...@gm...> - 2010年12月20日 00:37:14
When I open your eps file with ghostscript, I can see the problem.
I'm about 95% sure that this is related to the ghostscript not
correctly rendering the line.
In your ghostscript viewer, turn off "antialiasing" then you will see
straight line (of course w/o antialiasing).
This seems to be a known problem that has recently been fixed
http://www.ghostscript.com/doc/current/Changes.htm (see the entry of
2010年04月07日T13:13:57.741241Z Robin Watts)
It only happens when you use "round" join style. So, change your rc
file (or any other setting) not to use "round" style. In case you
must use "round" style, I guess you'd better upgrade your ghostscript.
Regards,
-JJ
On Mon, Dec 20, 2010 at 8:53 AM, andes <czu...@ya...> wrote:
>
> Hello JJ,
>
> Thanks so much for replying..
> I have attached the "eps" file.
>
> http://old.nabble.com/file/p30495318/figeps.eps figeps.eps
>
> c
>
>
>
> Jae-Joon Lee wrote:
>>
>> Can you post your eps file?
>> This may be related to the ps rasterizer you're using.
>> Regards,
>>
>> -JJ
>>
>>
>> On Thu, Dec 16, 2010 at 1:46 AM, andes <czu...@ya...> wrote:
>>>
>>> hello,
>>>
>>> When I save as an "eps" a figure created by matplotlib I face the problem
>>> that the inclined lines in the plot appear to be jagged when I open the
>>> "eps" (please see figure below). This problem doesn't appear when I save
>>> the
>>> figure as a pdf or png. Do you you know if there is a simple solution to
>>> this problem that I can implement in my example code (shown below)?
>>> I would greatly appreciate any advice.
>>> #----example code
>>> from numpy import *
>>> from pylab import *
>>> x=linspace(-1,1,100)
>>> y=x
>>> figure(1)
>>> p1,=plot(x,y,lw=3)
>>> savefig("figeps.eps")
>>> #---jagged line in plot
>>> http://old.nabble.com/file/p30465591/jagged.png
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/jagged-line-in-eps-from-matplitlib-tp30465591p30465591.html
>>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Lotusphere 2011
>>> Register now for Lotusphere 2011 and learn how
>>> to connect the dots, take your collaborative environment
>>> to the next level, and enter the era of Social Business.
>>> http://p.sf.net/sfu/lotusphere-d2d
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>
>> ------------------------------------------------------------------------------
>> Lotusphere 2011
>> Register now for Lotusphere 2011 and learn how
>> to connect the dots, take your collaborative environment
>> to the next level, and enter the era of Social Business.
>> http://p.sf.net/sfu/lotusphere-d2d
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
> --
> View this message in context: http://old.nabble.com/jagged-line-in-eps-from-matplitlib-tp30465591p30495318.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: andes <czu...@ya...> - 2010年12月30日 03:40:08
JJ,
Your suggestion worked!!!
I stopped using the "round" join style option from matplotlib as you
suggested by writing:
plot(x,y,ls='-',lw=3,solid_joinstyle='bevel')
I did not have to change the rc.
Thanks a bunch!
c
Jae-Joon Lee wrote:
> 
> When I open your eps file with ghostscript, I can see the problem.
> I'm about 95% sure that this is related to the ghostscript not
> correctly rendering the line.
> In your ghostscript viewer, turn off "antialiasing" then you will see
> straight line (of course w/o antialiasing).
> 
> This seems to be a known problem that has recently been fixed
> 
> http://www.ghostscript.com/doc/current/Changes.htm (see the entry of
> 2010年04月07日T13:13:57.741241Z Robin Watts)
> 
> It only happens when you use "round" join style. So, change your rc
> file (or any other setting) not to use "round" style. In case you
> must use "round" style, I guess you'd better upgrade your ghostscript.
> 
> Regards,
> 
> -JJ
> 
> 
> On Mon, Dec 20, 2010 at 8:53 AM, andes <czu...@ya...> wrote:
>>
>> Hello JJ,
>>
>> Thanks so much for replying..
>> I have attached the "eps" file.
>>
>> http://old.nabble.com/file/p30495318/figeps.eps figeps.eps
>>
>> c
>>
>>
>>
>> Jae-Joon Lee wrote:
>>>
>>> Can you post your eps file?
>>> This may be related to the ps rasterizer you're using.
>>> Regards,
>>>
>>> -JJ
>>>
>>>
>>> On Thu, Dec 16, 2010 at 1:46 AM, andes <czu...@ya...> wrote:
>>>>
>>>> hello,
>>>>
>>>> When I save as an "eps" a figure created by matplotlib I face the
>>>> problem
>>>> that the inclined lines in the plot appear to be jagged when I open the
>>>> "eps" (please see figure below). This problem doesn't appear when I
>>>> save
>>>> the
>>>> figure as a pdf or png. Do you you know if there is a simple solution
>>>> to
>>>> this problem that I can implement in my example code (shown below)?
>>>> I would greatly appreciate any advice.
>>>> #----example code
>>>> from numpy import *
>>>> from pylab import *
>>>> x=linspace(-1,1,100)
>>>> y=x
>>>> figure(1)
>>>> p1,=plot(x,y,lw=3)
>>>> savefig("figeps.eps")
>>>> #---jagged line in plot
>>>> http://old.nabble.com/file/p30465591/jagged.png
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/jagged-line-in-eps-from-matplitlib-tp30465591p30465591.html
>>>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Lotusphere 2011
>>>> Register now for Lotusphere 2011 and learn how
>>>> to connect the dots, take your collaborative environment
>>>> to the next level, and enter the era of Social Business.
>>>> http://p.sf.net/sfu/lotusphere-d2d
>>>> _______________________________________________
>>>> Matplotlib-users mailing list
>>>> Mat...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Lotusphere 2011
>>> Register now for Lotusphere 2011 and learn how
>>> to connect the dots, take your collaborative environment
>>> to the next level, and enter the era of Social Business.
>>> http://p.sf.net/sfu/lotusphere-d2d
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/jagged-line-in-eps-from-matplitlib-tp30465591p30495318.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Lotusphere 2011
>> Register now for Lotusphere 2011 and learn how
>> to connect the dots, take your collaborative environment
>> to the next level, and enter the era of Social Business.
>> http://p.sf.net/sfu/lotusphere-d2d
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
> 
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://old.nabble.com/jagged-line-in-eps-from-matplitlib-tp30465591p30555425.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /