Offsetting plot markers for simultaneous values

3 views (last 30 days)
In the gui I am designing I plot the values from different images that the user simultaneously selects through the GUI.
As you see I selected hold on to keep plots from previous images in order to follow the changes of handles.perc_nu through the plot. However the plot markers from different images appear always in the same vertical line. I would like each new marker to appear a "step" to the right of the previous plot marker vertical line This way, if I connected the different points with a curve, I would have a graphical represantation of how hanles.perc_nu increases or decreases in different images. Can you please help? My code follows:
function pushbutton2_Callback(hObject, eventdata, handles)
A = sum(sum(handles.bw));
cell_pixels = A;
all_pixels= numel(handles.bw);
handles.perc_nu=(cell_pixels/all_pixels*100)
handles.perc = [num2str(cell_pixels/all_pixels*100) '%'];
set(handles.edit2,'string',handles.perc )
hold on
plot(handles.axes2, handles.perc_nu,'Marker', 'o','markeredgecolor','k','markerfacecolor','r', 'MarkerSize',10 )
guidata(hObject, handles)

Answers (0)

Categories

Find more on Line Plots in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!