Offsetting plot markers for simultaneous values
3 次查看(过去 30 天)
显示 更早的评论
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)
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!