How do I vary the colour of a continuous graph in App Designer
Show older comments
I have got 3 sliders in the app designer, and I want to change the colour of the graph based on those values. And, I want to display the graph like a shift register, displaying 100 values at a given time. This is the way I am doing it:
plot(app.UIAxes_Error,error,'color',[Kp/10,0,0]);%Kp varies from 0 to 10
And, I am shifting the 'error' vector like this:
if i==100
error=error(2:end);
else
i=i+1;
end
But, as I am plotting the entire vector again, the colour of the entire graph changes.
I want the colour to change from the point I change the value of the slider, and all previous points on the graph still retaining their colour.
Accepted Answer
More Answers (0)
Categories
Find more on Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!