comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » help with scatter plot-like data
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
help with scatter plot-like data [message #84885] Mon, 17 June 2013 07:00 Go to next message
clykou is currently offline  clykou
Messages: 2
Registered: June 2013
Junior Member
Hi

I'm really out of my depth here with my minimal knowledge on IDL. Basically I'd like to make a color-coded 2D scatter plot, but I'm not sure how to do it.

Here's the thing. I already have values for my x and y axis and I already know that the positions of the scattered points for my z-axis are just the sqrt(x^2+y^2). But I'm not sure how to plot them in 2D.

I tried a dummy array
dummy=fltarr(3,n_elements(dataz))
dummy[0,*]=dataz
dummy[1,*]=xaxis
dummy[2,*]=yaxis

but then I have no idea how to use the plot command to make the scatter plot.

Any help will be very welcome!

Cheers
Re: help with scatter plot-like data [message #84887 is a reply to message #84885] Mon, 17 June 2013 07:08 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
clykou@gmail.com writes:

> I'm really out of my depth here with my minimal knowledge on IDL.
Basically I'd like to make a color-coded 2D scatter plot, but I'm not
sure how to do it.
>
> Here's the thing. I already have values for my x and y axis and I already know that the positions of the scattered points for my z-axis are just the sqrt(x^2+y^2). But I'm not sure how to plot them in 2D.
>
> I tried a dummy array
> dummy=fltarr(3,n_elements(dataz))
> dummy[0,*]=dataz
> dummy[1,*]=xaxis
> dummy[2,*]=yaxis
>
> but then I have no idea how to use the plot command to make the scatter plot.
>

You can find over 50 different kinds of plots, including 2D scatter
plots, and the IDL code to produce them, in the Coyote Plot Gallery:

http://www.idlcoyote.com/gallery/index.html

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: help with scatter plot-like data [message #84891 is a reply to message #84885] Mon, 17 June 2013 07:19 Go to previous message
clykou is currently offline  clykou
Messages: 2
Registered: June 2013
Junior Member
*correction
z-values are at the positions sqrt(x^2+y^2), and also independent of x,y
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: cgHistogram - logarithmic y-axis with integer values
Next Topic: Get directory list from HTTP Server

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:32:34 PDT 2025

Total time taken to generate the page: 0.00450 seconds