X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 18 Jun 2007 01:52 PM by  anon
PLOTS
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
18 Jun 2007 01:52 PM
    hello, I want to plot a line on an image (128x128) between two points, say (2,1) and (1,4). When I use PLOTS it fills all the pixels between the two points, i.e. the line is represented by the pixels (2,1),(1,2), (1,3),(1,4). Is there a way to plot a line on an image as an overlay without filling the pixels, i.e. similar to plotting a line on a graph? Thanks. ashraf.

    Deleted User



    New Member


    Posts:
    New Member


    --
    18 Jun 2007 01:52 PM
    I have written a series of antialiasing routines that are substitutes for PLOT, CONTOUR, SURFACE, XYOUTS, etc., which were posted to the 'user contributions' section. (Unfortunately I haven't written one for PLOTS). I recently updated the whole set, and only one, CONTOURSMOOTH has been reposted by the sysadmin for download. Anyway, if you download CONTOURSMOOTH and look at what I did (which is pretty simple), you should be able to make an antialiased PLOTS line on your image. Cheers, Tobin

    Deleted User



    New Member


    Posts:
    New Member


    --
    18 Jun 2007 01:52 PM
    I am not sure that I understand your question. However, I DO know that there is a pitfall in plotting lines over an image in that it is easy to make the plot call in a way that the coordinate arguments to the plot do not match the pixel-location-based coordinates of the image. Thus, below is an example of the proper way to call PLOTS, if you want it to use the pixel-location-based coordinate system of the image: window, XSIZE=128, YSIZE=128 data = 255.0 - dist(128) ; Makes a light-colored 128 x 128 example image tv, data ; Make a diagonal line through the center of the image plots, [10,117], [10,117], COLOR=0, /DEVICE It is the "/DEVICE" setting that insures that PLOTS will use the pixel-location based coordinate system. James Jones
    You are not authorized to post a reply.