|
# The same as above, with manual filtering
# Note that you have to specify the factors and you have to set the xtics as well.
# However, you have greater control over the appearance of the plot
# e.g. the order of the boxplots, their colors, the tic labels
# The previous form is intended for interactive usage while the latter form is better suited
# to creating publication-ready graphs.
factors = "Coal Gas Hydroelectric Nuclear Oil Renewable"
n_f = words(factors)
set xtic ("" 1)
set for [i=1:n_f] xtics add (word(factors,i) i)
t(x) = x/1.e6
filter(col, factor_col, level) = (strcol(factor_col) eq word(factors, level)) ? t(column(col)) : 1/0
plot for [i=1:n_f] 'energy_circles.dat' using (i):(filter(8, 4, i))
Click here for minimal script to generate this plot
|