I use the configs, below on gnuplot to plot a linechart:
set style data histogram
set ylabel "Number of Received Packets"
set format y '%.0s %c' #This is also another question I refer to at p.s, below
set style data linespoints
colorfunc(x) = x == 1 ? "#3399FF" : x == 2 ? "#00FF00" : x == 3 ? "#FF3333" : x == 4 ? "#00FFFF" : x == 5 ? "#003300" : "#FF00FF"
plot for [COL=2:6] 'Histogram' using COL:xticlabels(1) title columnheader lt rgb colorfunc(COL)
and the result is like this:
as you can see, the label of y-axis and the values on each axis are too small and can not be read easily. How can I change the size of them and make them bold(or resize them in final plot)?
p.s: I also use set format y '%.0s %c'
to Show human-readable Y-axis. So far so good and I'd say that this command does its job almost well but I prefer to remove the million (M) character from each value and put it on the label instead, what should I do to remove it?
If you are using an enhanced terminal, you can use the postscript notation to do this.
For example
set ytics format "{/:Bold {/=14 %h}}"
will make your ytic labels bold and in 14pt font.
The million character is added by the %c format specifier. If you don't want it just change your format specification to %.0s.
Thus to set your ytics to, let's say 12 points, in bold and NOT have that millions marker, you can do
set ytics format "{/:Bold {/=12 %.0s}}"
The question linked in the comments provides another way to set the size, but you can't do the bold format that way. If you wish to approach it with that command, you can do
set ytics font ",12"
set ytics format "{/:Bold %.0s}"
The help info for enhanced mode (?enhanced
) provides more information, and the documentation that comes with gnuplot (several pdfs in the windows version case) provides further documentation on ps commands.
More information on the format specifiers can be obtained from the help system by ?format specifiers
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With