Effacer les filtres
Effacer les filtres

Define a plot object but do not show the plot

12 vues (au cours des 30 derniers jours)
alpedhuez
alpedhuez le 30 Mai 2020
Commenté : alpedhuez le 30 Mai 2020
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.

Réponse acceptée

Tommy
Tommy le 30 Mai 2020
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 commentaires
Steven Lord
Steven Lord le 30 Mai 2020
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 le 30 Mai 2020
Yes this is the idea. Thank you.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Graphics Object Programming dans Help Center et File Exchange

Tags

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by