2
\$\begingroup\$

I am trying to plot three dimensional (multiple plane) data onto figures with various perspective view. The input data is tab-separated values in multiple file, and each file represent each plane. The document I referred is http://www.gnuplot.info/docs_5.4/Gnuplot_5_4.pdf .

An example is illustrated as below.

Plane1.txt

1 0 1
0 1 0
1 0 1

Plane2.txt

0 1 0
1 0 1
0 1 0

Plane3.txt

2 0 2
0 2 0
2 0 2

Is there any possible improvement of this code?

do for [LoopNumber1=0:360] {
    dir = 'View'.LoopNumber1
    command1 = "mkdir " . dir
    system command1
    do for [LoopNumber2=0:360] {
        set term jpeg size 1280,1024
        set out dir.'/GNUPlotOutput'.LoopNumber2.'.jpeg'
        set grid
        set key off
        #set logscale cb
        set view LoopNumber1,LoopNumber2

        splot for [i=1:3] 'Plane'.i.'.txt' matrix using 1:2:(i):3 with point pointtype 5 pointsize 0.75 pal
    }
}

One of the plotting result is as below.

PlottingResult

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.