I'm trying to have gnuplot put tics but not labels at 0, 1, 2, 3, 4, etc, and then put some text labels but not tics at 0.5, 1.5, 2.5, etc, but can't seem to figure it out. Is that even possible? Any help with that? Thansk!
Yes, that is possible, but not out of the box. Here is how you can achieve that:
0.5, 1.5 etc.: set xtics ("1st" 0.5, "2nd" 1.5, "3rd" 2.5, "4th" 3.5)set mxtics 2, but if you have manually defined xtics, then you must add the minor tics also manually: set for [i=0:4] xtics add (i 1)0 and the minor tics to the size of the major tics: set xtics scale 0,1So the following minimal script
set xtics ("1st" 0.5, "2nd" 1.5, "3rd" 2.5, "4th" 3.5)
set for [i=0:4] xtics add (i 1)
set xtics scale 0,1
set xrange [0:4]
plot x
gives (with 4.6.3)

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