GLE Example: color-markers-3d.gle

[PDF file]

 


size 12 10

sub draw_colored_markers_3d data$ marker$
   gsave
   set lstyle 1 lwidth 0.06 just center hei 0.3
   fopen data$ file read
   until feof(file)
      fread file x y z red green blue
      set color rgb255(red,green,blue)
      amove xg3d(x,y,0) yg3d(x,y,0)
      circle 0.025 fill rgb255(red,green,blue)
      aline xg3d(x,y,z) yg3d(x,y,z)
      marker marker$ 0.55
      set color black
      rmove 0 0.2
      write format$(z,"fix 2") 
   next
   fclose file
   grestore
end sub

begin object graph
   begin surface
      size 20 10
      cube xlen 20 ylen 20 zlen 10
      xaxis min 0 max 1 dticks 0.2 ticklen 0.09
      yaxis min 0 max 1 dticks 0.2 ticklen 0.09
      zaxis min 0 max 1 dticks 0.2 ticklen 0.09
      xtitle "Title x" hei 0.4
      ytitle "Title y" hei 0.4
      ztitle "Title z" hei 0.4
   end surface
   draw_colored_markers_3d "xyz.csv" ftriangle
end object

amove pagewidth()/2 pageheight()/2
draw graph.cc

 

[Return to examples page]