Change LineWidth with help of a function.
Mostra commenti meno recenti
I want the function to change the width of an already existing graph.
Calling the bytBredd. Loads the new width of the graph (a numeric value) and change in the plot as plot_handle suggest bytBredd(plot_handle).
The function bytBredd.m
function plot_handles= bytBredd(plot_handles)
bredd = inputdlg('Vilken bredd vill du ha? ');
id=getPlotHandle(plot_handles); % anropa getplothandle
figure(id);
plot_handle = get(gca,'Children');
handle=set(plot_handle,'LineWidth',bredd);
plot_handles(id) = handle;
end
Error message:
??? Undefined function or method 'getPlotHandle' for input arguments of type 'double'.
Error in ==> bytBredd at 3 id=getPlotHandle(plot_handles); % anropa getplothandle
Error in ==> mainMeny at 27 bytBredd(plot_handles);
Grateful for the help.
1 Commento
Fangjun Jiang
il 14 Ago 2011
You didn't show the function getPlotHandle().
Risposte (1)
Paulo Silva
il 14 Ago 2011
0 voti
You don't have the getPlotHandle function!
1 Commento
Martin
il 14 Ago 2011
Categorie
Scopri di più su Directed Graphs in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!