Labeling Plots inside Function

I have a function that creates a plot, but when I call it in my main script, I don't get any labels. Is there a way I can assign the labels within the function (without doing it in the main script)?
function [] = myplot(data)
xlabel('x');
ylabel('y');
title('title');
plot(data);

 Respuesta aceptada

the cyclist
the cyclist el 28 de Jul. de 2011

0 votos

I would try putting the labeling commands after the plotting command.

1 comentario

Paulo Silva
Paulo Silva el 28 de Jul. de 2011
or create first the axes, label it and plot the data

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 28 de Jul. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by