X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 24 Aug 2012 01:10 AM by  anon
Saving Polygon Plot
 5 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
24 Aug 2012 01:10 AM
    Hi When plotting polygons using the POLYGON()-Function, the plot seems to be implicitly triangulated and instead of a single polygon many triangles are plotted. When saving the plot to an eps-file one can see nasty white triangle boundary lines. Is there any way to plot neat color filled polygons without that behavior? Regards

    Deleted User



    New Member


    Posts:
    New Member


    --
    27 Aug 2012 11:51 AM
    Can you provide some code that demonstrates the problem you are seeing? Also, what version of IDL are you using?

    Deleted User



    New Member


    Posts:
    New Member


    --
    28 Aug 2012 12:26 AM
    Hi I am using Version 8.2.0.20120410. Here comes the code: X = [1,3,5,6,4,1,1] Y = [2,1,4,6,7,5,2] plot = PLOT(X,Y,/NODATA) Poly = POLYGON(X,Y, FILL_COLOR='Tan',/Data) poly.Save, 'polygon.eps' Looking at the eps, one can see the triangles with the common point [1,2]. As I understand the code from "\lib\itools\ipolygon.pro" at line 137 right: oPolygon->SetProperty, _DATA=points, /TESSELLATE, _EXTRA=_extra there's some implicit tesselation going on. But i cant prevent IDL from doing it ... Cheers

    Deleted User



    New Member


    Posts:
    New Member


    --
    28 Aug 2012 07:52 AM
    I think it is possible that what you are seeing are artifacts from your PostScript viewer, and have nothing to do with the PostScript file itself: http://www.idlcoyote.com/ps_tips/psstripes.html I believe if you printed the file, these lines wouldn't show up. I know if I convert the file to, say, a PNG file, they don't show up: IDL> cgPS2Raster, 'polygon.eps', /PNG

    Deleted User



    New Member


    Posts:
    New Member


    --
    30 Aug 2012 07:02 AM
    Hi David, ur right. Switching off the anti-aliasing of gsview helps. But i want to use eps-files in a high quality latex dokument, where i dont want to turn off anti-aliasing nor using raster images. My question remains: Why the tessellation of the polygons? Writing polygons with other programs to eps-file do not produce the triangle effects. Btw: Writing to a pdf (vector format) do not produce this effect. Regards

    Deleted User



    New Member


    Posts:
    New Member


    --
    10 Sep 2012 02:48 PM
    You might want to get in touch with ExelisVIS technical support to see what they have to say. Let them know your operating system, version of IDL the sample code you used and your license number.
    You are not authorized to post a reply.