X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 31 Mar 2012 06:06 AM by  anon
2D scatter plot with color values range
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
31 Mar 2012 06:06 AM
    Hi, I'd like to create a scatter plot with two independent variables and one dependent variable. The values of the dependent variable shoud be displayed as a colour range in the plot, and the two independent variables are to be shown on the x and y axis respectively. Thanks in advance.

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Apr 2012 05:10 AM
    hi this is prasenjit. since I've some experience to work on ENVI, its my suggestion that first you stack the layers which u want to have the scatter plot. then open the stacked image into the display window. after that you have an option at the display menu bar which is named as "tool" . just click it, a popup appear and you can find an option 2D scatter plot. a new window opens after clicking that option. the new window gives you the option to choose the layers in X and Y axis. just choose it, I think you can get the scatter plot in the way you want. in the scatter plot window, by right clicking and holding it u can select any part of the scatter plot and simultaneously u can give any color u want and that particular color at the same time also appear in the display window of the main image. hope u find ur ways... prasenjit

    Deleted User



    New Member


    Posts:
    New Member


    --
    01 Apr 2012 09:19 AM
    You can do this with cgScatter2d from the Coyote Library: data_1 = cgDemoData(1)+ RandomU(seed, 101) * 10 data_2 = cgDemoData(1)+ RandomU(seed, 101) * 20 + 50 data_3 = cgDemoData(1) cgLoadCT, 33 cgScatter2d, data_1, data_2, COLOR=BytScl(data_3) You can learn more about the Coyote Library at Coyote's Guide to IDL Programming: http://www.idlcoyote.com/ Get the latest version! :-)

    Deleted User



    New Member


    Posts:
    New Member


    --
    02 Apr 2012 05:27 AM
    Hi, Thanks for your answer but, the cgscatter2d procedure only specifies a string/integer value for color parameter. It's not possible to put a scaled color vector. cgScatter2d, data_1, data_2, COLOR=BytScl(data_3) -> error My file has 3 columns x,y,z (x,y are positions and z meaning densities) I need to show every z value scaled in a range of colors. Now, I'm using contour plots to do it, but I need a more smoothed and realistic image. Thanks.

    Deleted User



    New Member


    Posts:
    New Member


    --
    02 Apr 2012 05:57 PM
    You don't have the latest version, which can be found here: http://www.idlcoyote.com/...rams/cgscatter2d.pro
    You are not authorized to post a reply.