Plots disappear when I change y-limit
2 次查看(过去 30 天)
显示 更早的评论
Edit: Never mind. I realized after posting this, said figure isn't 9 'plot' commands. It's 9 'plot3' commands each figure viewed from [0 0]. As such, zlim should have been used to change the range. I will point out that 'plot3' appears to be one of the few commands that won't take an axes handle as an overload to the first input.
Original text below:
I created a figure with 9 subplots each of which is made of 4 curves created using the 'hold on' command. I've saved the figure and uploaded it. When I perform the following commands on the original plot or on the saved figure I get the same results.
I did not erase the box around the plots in my plotting commands so obviously something is wrong in the way this plot is made but it's not something different from what I've done before. Can anyone tell what's wrong with my figure such that I can fix my code?
I'm running MATLAB 2017b on Windows 10, x64
Thanks in advance.
subplot(331)
ylim([0 3e-6]); % does nothing
subplot(332)
ylim([0 3e-6]); % erases the contents of the axis same for subplots 3-9
1 个评论
Steven Lord
2018-4-5
"I will point out that 'plot3' appears to be one of the few commands that won't take an axes handle as an overload to the first input."
According to the documentation plot3 does accept an axes handle as the first input argument to control on which axes the line is created. See line 4 in the Syntax section.
If you have a situation where that doesn't seem to work, please post a small segment of the code that demonstrates that situation (along with any error or warning messages you received) and we may be able to help you figure out why you're seeing that behavior.
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!