Siladittya
Siladittya

Reputation: 1205

How to display custom data points along the x-axis in Octave?

I want to plot a vector of length 7 against a a vector also of length 7 with values [697 770 852 941 1209 1336 1477]

I want to display the values [697 770 852 941 1209 1336 1477] along the x-axis at the respective data points.

How to do this in Octave using stem function?

Upvotes: 1

Views: 233

Answers (1)

Siladittya
Siladittya

Reputation: 1205

set(gca(),'xtick',[697,770,852,941,1209,1336,1477]) set(gca(),'xticklabel',{'697','770','852','941','1209','1336','1477'})

These two lines of code solved it... :|

Upvotes: 1

Related Questions