How can I xticks at equal distance

I am trying to plot the graph betweek gain K and frequency F_x, I want the graph to be plotted for only these three [0.1 1 10] values. When i plot the graph, the distance between these values are not equal as shown in the picture. The commadns that I am using at below.
plot(F_x,K)
hold on
axis([0.1 10 0 3])
xticks([0.1 1 10])
Any help is much appreciated,

Answers (1)

Assuming you want them equally spaced because they are equally spaced on a log scale:
semilogx(F_x,K)
xticks([0.1 1 10])

1 Comment

If you want the plot to look exactly the same (linear scale), but be labeled uniformly (i.e. incorrectly):
plot(F_x,K)
xticks([0.1 5.05 10])
xticklabels([0.1 1 10])

Sign in to comment.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Asked:

on 21 Feb 2020

Commented:

on 21 Feb 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!