Reputation: 9110
I am trying to use gnuplot
to draw a figure. Due to the limited space, the figure is drawn like this:
I am thinking to move the first three labels (ins-replace
, bb-split
and func-reorder
to the top of the figure, outside!)
So it should be something like this :
set key outside
But basically how to select the first three keys and move them to the outside? Is it possible to do so?
I put my script here:
set term pdf size 10,8 font "Arial,44"
set output "plot/bzip-ropbase-mix.pdf"
set size ratio 0.6
#set multiplot layout 1,1
set datafile separator ","
set offset 0, 0, 0, 0
set xtics norangelimit
set ytics nomirror
set termoption dashed
set ylabel "Gagdet Elimination Rate (%)"
set xlabel "Iteration"
set key bottom right
set yrange [0:110]
set style data linespoints
set key vertical maxrows 5
plot 'plot/bzip-ropbase-data.csv' using 11:xtic((int($0)%4)==0? sprintf("%d", $0*50):"") title columnheader(11) pt 4 lw 1, \
'' using 12 title columnheader(12) pt 5 lw 4 ps .8 lc rgb "#4169E1", \
'' using 13 title columnheader(13) pt 6 lw 4 ps .8 lc rgb "#DAA520", \
'' using 14 title columnheader(14) pt 7 lw 4 ps .8 lc rgb "#FF7F50", \
'' using 15 title columnheader(15) pt 8 lw 4 ps .8 lc 7
Could anyone give me some help? Thank you!
Upvotes: 4
Views: 1249
Reputation: 7627
You cannot do this automatically but there are ways around it. The first one to come to mind is to use multiplot, then plot first all the functions and files whose title you want outside and then all of those that you want inside. You'll need to disable drawing borders etc. for the first instance and then enable it for the second instance. To make sure your plotting area remains constant during the two plot
instances you'll need to hard set the margins:
set multiplot
set xrange [0:2.*pi]
# Set the margins
set lmargin at screen 0.1; set rmargin at screen 0.98
set tmargin at screen 0.8; set bmargin at screen 0.1
# Disable drawing borders and tics
unset border; unset tics
# Set position of the legend
set key tmargin
# Draw the first batch of stuff
plot cos(x) lc 1
# Enable drawing borders and tics
set border; set tics
# Set position of the legend
set key inside
# Draw the second batch of stuff
plot sin(x) lc 2
Upvotes: 3