I have a speradsheet
column 1 = day
column 2 = temperature
column 3 = rainfall
I want to define
plot_temperature=plot(day, temperature)
plot_rainfall=plot(day, rainfall)
But I do not want to display these two plots when I define these objects. Please advise.

 채택된 답변

Tommy
Tommy 2020년 5월 30일

0 개 추천

plot_temperature=plot(day, temperature, 'Visible', 'off');
plot_rainfall=plot(day, rainfall, 'Visible', 'off');
Or if you don't even want a figure to show:
f = figure('Visible', 'off');
ax = axes(f);
plot_temperature=plot(ax, day, temperature);
plot_rainfall=plot(ax, day, rainfall);

댓글 수: 3

alpedhuez
alpedhuez 2020년 5월 30일
The idea is just to define these plot objects so that one can reuse them when one wants to plot multiple times (with different x axis, y axis, and title specifications). But the above definitions may not be portable...
So you want to write a function that accepts data and plots that data using settings you've chosen earlier? Generating code from a plot that you've created and customized so it looks the way you want is probably a good first step.
alpedhuez
alpedhuez 2020년 5월 30일
Yes this is the idea. Thank you.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

제품

릴리스

R2020a

태그

질문:

2020년 5월 30일

댓글:

2020년 5월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by