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-07T13: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-07T13: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. |