Gnuplot uses the hyphen-minus sign (U+002D) when it prints negative numbers (e.g., tick labels). I would like to make Gnuplot use the unicode minus sign (U+2212).
Usually, I have relied on one of the following workarounds:
set xtics (-0.05 "−0.05", ...)
;epslatex
) and enclose the number within $$
(e.g., set format x "$%.2f$"
).However, none of the above solution appeals me. Is there any way to make Gnuplot automatically use the correct typographical convention for negative numbers?
The minus sign (−) is used with numbers to indicate negative amounts or as the symbol for the subtraction operation. The hyphen (‐) is used to link together different parts of a word (e.g. “ex‐wife”, “field-artillery”) or as a sign to indicate that the rest of a word is on the next line.
The name "hyphen-minus" derives from the original ASCII standard, where it was called "hyphen (minus)". The character is referred to as a "hyphen", a "minus sign", or a "dash" according to the context where it is being used.
The minus and hyphen sign are the same thing. A hyphen is a short, single-character line which connects word parts (i.e. ice-cream). A dash is a longer line—double the length of a hyphen—which indicates a break or an interruption in the thought.
Since version 5.0.5 gnuplot has a set minussign
command. When this is set, the gprintf
function, which is also used to set the tics labels, uses typographic minus signs (U+2212) instead of a hyphen:
set encoding utf8
set minussign
plot x
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