Why isn't ezplot holding on?

% settings for figure and axis
figuraT1 = figure('Name',title,'Position', get(0,'Screensize'));
maxfig(figuraT1,1);
assiT1 = axes('Parent', figuraT1);
dim=length(fsymarr);
for i=1:dim
ezplot(fsymarr(i),[min,max],figuraT1)
hold on
end
grid on
set(assiT1, 'LineWidth',1.5);
set(assiT1,'FontSize',14,'FontWeight','bold','FontAngle','Italic');
ylabel('Y Values');
xlabel('X Values');
Why does the function ezplot plot only the last function in the array fsymarr?

4 个评论

What is class(fsymarr) ?
It is an array where there are some functions which need to be plotted on the same graph; they represent the domain of a function in multivariable problem. I'd like to plot them if their domain is in R2 but ezplot isn't holding on...
What does
class(fsymarr)
show ? I need to know in order to tell you the correct solution.
Also I will need to know your MATLAB version number.
fsymarr is a simple vector containing explicit 2D functions expressed in symbolic vars. For example it might contain: [x^2+1, sqrt(x)]. I iterate over the vector fsymarr to plot all these functions on the same graph.
Version 2012a.

请先登录,再进行评论。

 采纳的回答

Walter Roberson
Walter Roberson 2013-4-24
编辑:Walter Roberson 2020-9-4

0 个投票

The only thing I see at the moment is that ezplot() automatically adjusts the plot limits in ways such that the results of the earlier plot might only be partly visible (or out of range completely.)
Try changing to "hold on" instead of "hold all" -- but note that if you do that then the limits established first will be used, possibly leaving other plots mostly out of window.

2 个评论

That was the problem; unfortunately I did not realize since all the graphs are complementary. I've just written some code which manages to resize the axis dinamically. Thank you very much!
Hello Alessio Nava, I have the same problems with "hold on" and "ezplot", the axes change and the graph does not come out well. Could you give me some indication about your code, I would really appreciate it. Thank you.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Time Series Events 的更多信息

产品

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by