Menu

Subtract two surfaces

Help
2016-09-05
2016-09-17
  • Markus Küster

    Markus Küster - 2016-09-05

    Hi,
    i would like to import two CSV files. So far so good.
    This works very well. But I would like to subtract the two surfaces and get the difference (distance) between the two surfaces.

    I searched on Google and read a lot of tutorials. But i did not find the right one.
    For reading the data and plot it following code is used:

    cd 'd:\temp\ '
    set datafile separator ";"
    set datafile commentschars "#!%"
    set dgrid3d splines
    set dgrid3d 30,30 qnorm 2
    set pm3d
    set contour base
    set cntrparam levels incr 85,1,95
    set cntrlabel start 2 font ",7"
    set contour both
    set zrange [85:94]
    set view 0,0
    set palette rgbformulae 22,13,-31
    splot "Alt_220_RL_50C.csv" u 1:2:3 with lines,"220_RL_50C.csv" u 1:2:3 with lines
    

    I would like to subtract the two plotted surfaces. For the values that are not available i would try an "if then" solution.
    What would be the best way to solve the issue ? I am very happy about every hint and answer i will get.

    Best Regards
    Markus

     
  • Karl Ratzsch

    Karl Ratzsch - 2016-09-17

    (all values will be available, that's what dgrid3d is for.)

    Not possible without external help, i'm afraid.

    You can plot the two grids to temporary files, combine them (e.g. on unixoid systems paste file1 file2 > nfile)

    and then plot that file with

    unset dgrid3d
    splot nfile using 1:2:($6-$3)
    
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.