Show the xticks in the view of 2D

4 views (last 30 days)
Hi, I use surf to plot a 3D surface, see below
And I want to see it in 2D view, so I use view(2), and I get the figure below.
But for this 2D contour, xticks disappear (only 5, 10, ... show but no tick marks).
I guess it is due to some settings in 3D surface. Could anyone help me to solve this problem to make it like a general 2D figure? Thanks!

Accepted Answer

Star Strider
Star Strider on 6 Oct 2021
The default tick direction is 'in', so the x-ticks are not visible in the second plot.
Set TickDir to 'out' or 'both' to see them.
Star Strider
Star Strider on 6 Oct 2021
As always, my pleasure!

Sign in to comment.

More Answers (0)


Find more on Contour 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!

Translated by