X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01 Oct 2007 02:41 PM by  anon
rectangle of values around x,y coordinates
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
01 Oct 2007 02:41 PM
    Hi, I have a bunch of x,y coordinates. I need to plot them. However, I also need to add a rectangle of values around them of arbitrary length and breadth. i.e. give values to the pixels around the center pixel so that a rectangle is 'drawn'. Furthermore, to complicate matters more, I need my rectangle to be tilted by a certain angle. I could go with a for loop and assign neighboring pixels values by pre-determining which pixels they will be. However, I would think there is a more elegant way to do this..? Any suggestions? Thanks, radha

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Oct 2007 02:41 PM
    Dear Radha, I was thinking that maybe what you need is to basically create your one symbols that will be plot around the date set. You can try a code similar to the following: pro my_symbol sym_vertices_x=[1.2,-0.8,-1.2,0.8] *2.0 sym_vertices_y=[1,1,-1,-1] *2.0 ;Then create the object that will be a filled tilted squared shape: omy_symb=obj_new('IDLgrPOLYGON',sym_vertices_x,sym_vertices_y) ;And at last you can call iplot with the keyword "SYM_OBJECT": iplot, findgen(5), SYM_OBJECT=omy_symb end This code generates a filled tilted squared shape around each data set. In my next answer I will send you the same example but with transparent empty recatangles instead. Best regards, Fernando
    You are not authorized to post a reply.