Good day, everyone. I would like to ask a question on 3d displaying.
I have this data file.
dat1.txt:
Sokcho 38.2500 128.5667 17.8
Cheorwon 38.1500 127.3000 154.2
Dongducheon 37.9000 127.0667 112.5
Daeguallyeong 37.6833 128.7667 842.5
Chuncheon 37.9000 127.7333 76.8
I read this file as follows.
readcol, 'dat1.txt', city, lat, lon, alt, format = 'A, 3F'
And then I am going to display these data into 3d.
x = lon, y = lat, z = alt
Based on the a procedure on www.dfanning.com, I tried this way but the results was not what I wanted to. Is there anyone to help me?
-----------------------------------------------------------------------------------
PRO SCATTER3D_altitude
; Read the data file.
readcol, 'dat1.txt', city, lat, lon, alt, format='A, 3F7.2'
n=n_elements(lat)
vsym, 24 , /fill
; Load a color table and create colors for the scatterplot.
LOADCT, 38, NCOLORS=!D.N_COLORS-1
TVLCT, 70, 70, 70, !D.N_COLORS-1
zcolors = BYTSCL(alt, TOP=!D.N_COLORS-2)
; Set the 3D coordinate space with axes.
SURFACE, DIST(5), /NODATA, /SAVE, XRANGE=[125,132], $
YRANGE=[33,39], ZRANGE=[0, 900], CHARSIZE=1.5, COLOR=!D.N_COLORS-2, BACKGROUND=!D.N_COLORS-1, $
; Plot the random points in 3D space with a diamond shape.
PLOTS, lon, lat, alt, PSYM=4, COLOR=zcolors, /T3D
; Connect the data points to the XY plane of the plot.
FOR j=0, n-1 DO PLOTS, [lon(j), lon(j)], [lat(j), lat(j)], [0, alt(j)], COLOR=zcolors(j), /T3D
END
|