Thank you Henrique for showing me how to use --matrix= as an option
for gnuplot. I simply missed this option in the manual.
Now I think I have something not in the manual:
Can I plot 2 sets of X-Y variables in a single gnuplot
with one showing a connected line and the other x points ?
The problem is the 2 sets have different matrix lengths (rows)
The following gnuplot input gives the basic look
but I have about 10,000 more scatter points to plot
# set term pngcairo font "verdana,8"
set encoding utf8
set style line 1 lc rgb "#ff0000" lw 2
set style line 2 lc rgb "#ff0000"
set xzeroaxis
set title "Mean-Variance Efficient Frontier"
set ylabel "Expected return"
set xlabel "Std-dev"
set grid ytics
set yrange [0:8]
set xrange [0:100]
plot \
'-' using 1:($2) title "" w lines, '-' using 1:($2) title
"" w points
37.34392177 2.97360052
38.93497674 3.315788614
41.15302283 3.657976708
43.90313334 4.000164802
47.09218512 4.342352895
50.63731467 4.684540989
54.46904008 5.026729083
58.5311026 5.368917177
62.7788067 5.71110527
e
47.87386803 4.236153823
53.21768427 4.637368399
48.34658154 4.233955778
52.43479596 4.640319946
51.23960034 4.49318912
63.37821207 5.368805231
51.19436633 4.531811607
55.52425526 4.746143464
57.27659417 4.984767162
50.46428986 4.468835106
52.99520784 4.614860001
52.77690827 4.707596727
47.30102507 4.201675871
50.27836542 4.500478414
e
I could live with
gnuplot 1 2 --matrix=A --input="@fname" --output=display
with a file holding the line values, but I could not seem to combine
--matrix & --input
and it seems you can not add the line using plot commands enclosed in { }
either. Am I right about this?