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!