Menu

#2061 Resetting tics to their defaults is incomplete

open
nobody
None
2018-06-27
2018-06-27
No

From the documentation I would expect that the command sequence "unset xtics; set xtics" resets the xtics configuration to its default settings.

However, this does not work for all details of the xtics configuration. I executed the following to test it (it's kind of pseudo code, but you will get the point):

reset
# remember the default xtics settings into a file
show xtics > defaults.txt   
# change many details of the xtics configuration
set xtics out scale 2,1 axis nomirror left format "%0.2f" rotate 90 offset 1,1 font "serif,10" noenhanced textcolor rgb "blue"
# reset xtics to default values
unset xtics; set xtics
# copy the current settings into another file
show xtics > back_to_defaults.txt

I would expect the content of defaults.txt and back_to_defaults.txt to be identical, but they are not:

diff defaults.txt back_to_defaults.txt

  4c4
<           labels are justified automatically, format "% h" and are not rotated,
---
>           labels are justified automatically, format "%0.2f" and are not rotated,
6c6
<           intervals computed automatically
---
>           series by 90

So it seems that at least the formatstring and the ticmark intervals are not correctly reset to their default values.

I am not 100% sure if this is really a bug, or if there is a "more correct" way to reset the xtics configuration to its default values. I do not want to execute a global "reset" to do this.

The same applies for all other axes as well.

Running gnuplot-5.2.3 on Linux.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.