Nikko
Nikko

Reputation: 547

Resetting xtics ytics gnuplot

Is there any way to reset or to use the default settings for xtics (or ytics) after I've already used a custom setting?

I need something like that:

set ytics 0.005 nomirror
set y2tics 5 nomirror
plot 'dummy' u 1:2 axes x1y1, dummy2 u 1:2 axes x1y2

##Another plot with "normal" axes
set ytics default (this command doesn't exist but this is what I need)
set y2tics default
plot 'dummy3' u 1:2

So if that command would actually exist, that would solve my problem because what I have now is that the second plot is using, of course, the ytics defined for the previous one. And I don't want to use the reset option because I don't want to define everything again in my script.

Thank you very much!

Upvotes: 7

Views: 5006

Answers (3)

greg
greg

Reputation: 562

Use:

unset ytics

from http://www.gnuplot.info/docs_4.2/node295.html

The tics may be turned off with the unset xtics command

Upvotes: 0

RoBo
RoBo

Reputation: 78

You could put reset before your second plot. But it will reset everything and might be an overkill for you.

You can also use set ytics auto. It might be better.

Best,

Upvotes: 5

user4489658
user4489658

Reputation:

From gnuplot help:

The defaults are border mirror norotate for tics on the x and y axes, and border nomirror norotate for tics on the x2 and y2 axes.

So, your commands should be:

set ytics border mirror norotate autofreq
set y2tics border nomirror norotate autofreq    

Upvotes: 0

Related Questions