Clear Filters
Clear Filters

Plotting a scatter graph with a categorical X axis

15 views (last 30 days)
I have a scatter graph as shown above but I want to alter the x axis so that I can have a category for every jump in 10. So basically I would like to replace each interval of 10 with a word or 2 to represent a category

Answers (1)

Scott MacKenzie
Scott MacKenzie on 3 May 2023
Just follow your chart function with code to add tick labels at 5, 15, 25, etc. Something like this should work:
xticklabels({'first', 'second', 'third', 'fourth', 'fifth', 'sixth'});


Find more on Discrete Data Plots in Help Center and File Exchange





Community Treasure Hunt

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

Start Hunting!