Thanks to visit codestin.com
Credit goes to github.com

Skip to content

raidenXR/GnuplotFS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is a thin wrapper over System.Diagnostics.Process to 'easily' interact
with Gnuplot from F#.There are a couple of examples in the test\ directory.
Mostly it is few helper functions and a custom operator |>> that takes a string as an argument.
It expects regular Gnuplot dsl. So no need to learn a new library, only regular gnuplot dsl!!

Gnuplot(false, false, Some "Cp_fixed.png")
|>> "set term png size 800,600"
|>> "set xlabel 'Edge Point Angle'"
|>> "set ylabel 'Pressure Coefficient'"
|> Gnuplot.datablockXYZ (θ.ToArray()) (Cp_approx.ToArray()) (Cp_analyt.ToArray()) "vs"
|>> "plot $vs using 1:2 title 'C_P approx' with lp lc rgb 'black' ,\\"
|>> "$vs using 1:3 title 'C_P analyt' with lp lc rgb 'blue'" 
|> Gnuplot.run
|> ignore

Gnuplot(false, false, Some "velocities_fixed.png")
|>> "set term png size 800,600"
|>> "set xlabel 'Edge Point Angle'"
|>> "set ylabel 'Velocity'"
|> Gnuplot.datablockXYZ (θ.ToArray()) (U.ToArray()) (V.ToArray()) "vs"
|>> "plot $vs using 1:2 title 'V_X' with lp lc rgb 'black' ,\\"
|>> "$vs using 1:3 title 'V_Y' with lp lc rgb 'blue'" 
|> Gnuplot.run
|> ignore

let gnu4 = Gnuplot("tests_output/images/image4.png")
gnu4
|>> "set terminal pngcairo  transparent enhanced font 'arial,10' fontscale 1.0 size 600, 400 "
|>> "set key at screen 1, 0.9 right top vertical Right noreverse enhanced autotitle nobox"
|>> "set style textbox  opaque margins  0.5,  0.5 fc  bgnd noborder linewidth  1.0"
|>> "set view 60, 30, 1, 1.1"
|>> "set samples 20, 20"
|>> "set isosamples 21, 21"
|>> "set hidden3d back offset 1 trianglepattern 3 undefined 1 altdiagonal bentover"
|>> "set contour both"
|>> "set cntrlabel  format '%8.3g' font ',7' start 5 interval 20"
|>> "set cntrparam levels 10"
|>> "set style data lines"
|>> "set title 'contours on both base and surface' "
|>> "set xlabel 'X axis' "
|>> "set xrange [ * : * ] noreverse writeback"
|>> "set x2range [ * : * ] noreverse writeback"
|>> "set ylabel 'Y axis' "
|>> "set yrange [ * : * ] noreverse writeback"
|>> "set y2range [ * : * ] noreverse writeback"
|>> "set zlabel 'Z ' "
|>> "set zlabel  offset character 1, 0, 0 font '' textcolor lt -1 norotate"
|>> "set zrange [ * : * ] noreverse writeback"
|>> "set cbrange [ * : * ] noreverse writeback"
|>> "set rrange [ * : * ] noreverse writeback"
|>> "set colorbox vertical origin screen 0.9, 0.2 size screen 0.05, 0.6 front  noinvert bdefault"
|>> "NO_ANIMATION = 1"
|>> "splot x**2-y**2 with lines, x**2-y**2 with labels boxed notitle"
|> Gnuplot.run

image

About

a thin wrapper over System.Diagnostics.Process to easily plot with Gnuplot from F# code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages