last xtick label is not showing up!
6 views (last 30 days)
I am fairly uncertain why my final label is not showing up! The content of the plots themselves are not too important, but I want to place on the x-axis at x=1 the label $(\pi,\pi)$.
My code was labeling correctly till I changed it to what I have now. I am sure there is just some dumb mistake somewhere... Which are sometimes the hardest to find!
The code which contains the tick marks is in matrix ploter, and the data is generated by BdG*. Hopefully a fresh set of eyes can find the issue, and thanks!
Voss on 22 Nov 2022
I think it's because surf doesn't render the last row or column of the matrix (so that the surface doesn't actually go all the way to x=1 but stops just before).
M = magic(4) % 4-by-4 matrix
surf(M) % only 3-by-3 is shown
To correct that, you can replicate the last row and column of your matrix, as in:
M = magic(4);
M = M([1:end end],[1:end end]) % 5-by-5 with last row and column repeated
surf(M) % 4-by-4 is shown