Skip to content

Instantly share code, notes, and snippets.

@sams96
Last active May 12, 2017 10:47
Show Gist options
  • Save sams96/095c61f47a2a881e4024baaec5434045 to your computer and use it in GitHub Desktop.
Save sams96/095c61f47a2a881e4024baaec5434045 to your computer and use it in GitHub Desktop.
set terminal epslatex size 13.5cm, 10cm
set output 'bifsample.tex'
set datafile separator ","
set nokey
set xrange [2.4:4.0]
set xlabel '$r$'
set ylabel '$x$'
plot "bifsample.csv" using 1:2 lc black pt 7 ps 0.02
set terminal epslatex size 13.5cm, 10cm
set output 'bifurcation.tex'
set datafile separator ","
set nokey
set xlabel 'Table Position (\si{\volt})'
set ylabel 'Ball Position (\si{\volt})'
plot "bifurcation-data.csv" using 1:2 lc black pt 7 ps 0.2
set terminal epslatex size 13.5cm, 10cm
set output 'phasespace.tex'
set datafile separator ","
set nokey
unset xlabel
unset ylabel
set label 2 'Ball Velocity (\si{\volt})' at screen 0.46, 0
set label 3 'Ball Position (\si{\volt})' at screen 0, 0.45 rotate by 90
set xrange [-5.2:5.2]; set yrange [-2.6:2.6]
set macros
POS = "at graph 0.8, 0.9 font ',8'"
NOXTICS = "set format x '';; unset xlabel"
XTICS = "set format x '%.0f'; set xtics 2; unset xlabel "
NOYTICS = "set format y ''; unset ylabel"
YTICS = "set format y '%.0f'; unset ylabel "
STYLE = "every ::1000 using 1:2 lc black pt 7 ps 0.05"
set multiplot layout 2, 2 rowsfirst margins 0.1, 0.98, 0.1, 0.98 spacing 0, 0
@NOXTICS; @YTICS;
set label 1 '\SI{0.25}{\volt}' @POS
plot "1000hz-0.25v.csv" @STYLE
unset label
@NOXTICS; @NOYTICS;
set label 1 '\SI{0.50}{\volt}' @POS
plot "1000hz-0.5v.csv" @STYLE
@XTICS; @YTICS;
set label 1 '\SI{0.75}{\volt}' @POS
plot "1000hz-0.75v.csv" @STYLE
@XTICS; @NOYTICS;
set label 1 '\SI{1.00}{\volt}' @POS
plot "1000hz-1v.csv" @STYLE
unset multiplot
set terminal epslatex size 13.5cm, 10cm
set output 'poincare.tex'
set datafile separator ","
set nokey
unset xlabel
unset ylabel
set label 2 'Ball Velocity (\si{\volt})' at screen 0.46, 0
set label 3 'Ball Position (\si{\volt})' at screen 0, 0.45 rotate by 90
set xrange [-5.2:5.2]; set yrange [-2.6:2.6]
set macros
POS = "at graph 0.8, 0.9 font ',8'"
NOXTICS = "set format x '';; unset xlabel"
XTICS = "set format x '%.0f'; set xtics 2; unset xlabel "
NOYTICS = "set format y ''; unset ylabel"
YTICS = "set format y '%.0f'; unset ylabel "
STYLE = "every 1250::1000 using 1:2 lc black pt 7 ps 0.3"
set multiplot layout 2, 2 rowsfirst margins 0.1, 0.98, 0.1, 0.98 spacing 0, 0
@NOXTICS; @YTICS;
set label 1 '\SI{0.25}{\volt}' @POS
plot "1000hz-0.25v.csv" @STYLE
unset label
@NOXTICS; @NOYTICS;
set label 1 '\SI{0.50}{\volt}' @POS
plot "1000hz-0.5v.csv" @STYLE
@XTICS; @YTICS;
set label 1 '\SI{0.75}{\volt}' @POS
plot "1000hz-0.75v.csv" @STYLE
@XTICS; @NOYTICS;
set label 1 '\SI{1.00}{\volt}' @POS
plot "1000hz-1v.csv" @STYLE
unset multiplot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment