How to put two separate scales on the same x-axis?
1 view (last 30 days)
Show older comments
I would like to create a plot in MATLAB with two separate scales along the x axis. I need the negative x-axis to go from -15 to 0 and have intervals of 5 and the positive x-axis to go from 0 to 0.8 with intervals of 0.1. The plot needs to have the same x-axis as the image. Thank you.

0 Comments
Answers (1)
William Rose
on 24 Oct 2022
1 Comment
William Rose
on 24 Oct 2022
Edited: William Rose
on 24 Oct 2022
@Stephen Bompastore, I did not read your quesiton carefully enough. I see that the quesiton which @dpb answered was different than what you are asking.
The info here should be adaptable to do what you want. THat site includes instructions for making the plot below:

I am confident that you can modify those instructions to make your plot.
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!