X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12 Aug 2011 07:07 AM by  anon
Scatterplots using new IDL8 graphics
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:4
New Member


--
12 Aug 2011 07:07 AM
    I am trying to produce scatterplots using the new IDL8 graphics functionalities. For example, I use the PLOT procedure to plot band3 against band4: test=plot(imagearr[*,*,2],imagearr[*,*,3],SYM_INDEX = 'dot') But this always produces the following errors: % PLOT: Arguments have invalid dimensions % Error occurred at: GRAPHIC 22 C:\Program Files\ITT\IDL\IDL80\lib\graphics\graphic_error.pro % PLOT 63 C:\Program Files\ITT\IDL\IDL80\lib\graphics\plot.pro % $MAIN$ % Execution halted at: $MAIN$ IDL> test=plot(imagearr[*,*,2],imagearr[*,*,3]) % PLOT: Arguments have invalid dimensions % Error occurred at: GRAPHIC 22 C:\Program Files\ITT\IDL\IDL80\lib\graphics\graphic_error.pro % PLOT 63 C:\Program Files\ITT\IDL\IDL80\lib\graphics\plot.pro % $MAIN$ % Execution halted at: $MAIN$ The error indicates something regarding the dimensions. What I am trying to plot comes from the same array: imagearr=bytarr(1000,1000,36) When I use the plot funtion in the "old way" (prior to IDL8) the scatterplot is produced without any problems: plot,imagearr[*,*,2],imagearr[*,*,3],psym=3 Help is very much appreciated! Thanks! Patrick

    Deleted User



    New Member


    Posts:
    New Member


    --
    12 Aug 2011 10:59 AM
    Hi Patrick, What happens here is that in the plot function, as well as in the iplot routines, a vector is needed as arguments for the abscissa and ordinate. Please, take a look at the IDL help for PLOT function, it says: Arguments X A vector representing the abscissa values to be plotted. If X is not specified, Y is plotted as a function of point number (starting at zero). If both arguments are provided, Y is plotted as a function of X. In the case of the plot routine that works for your example, the two dimensions that are left free in the arguments are consider as a long vector that is scanned from the first element trought the first line and then continue to the second line, etc. That's why it works for the plot routine, but not for the plot function. You will need to supply to the plot function two one dimensional vectors for X and Y. I hope this helps. Cheers, Fernando
    You are not authorized to post a reply.