필터 지우기
필터 지우기

draw points using mouse

조회 수: 26 (최근 30일)
Seldeeno
Seldeeno 2014년 5월 5일
댓글: Jon 2022년 1월 4일
Hi,
I want draw points using mouse and then make matlab plot using a specified marker please
Thanks to you
  댓글 수: 2
Geoff Hayes
Geoff Hayes 2014년 5월 5일
Seldeeno - please provide some more details and/or steps on what you are trying to accomplish. Are you clicking on something (an image perhaps) and then want MATLAB to overlay a marker of some kind?
Seldeeno
Seldeeno 2014년 5월 5일
Actually I want draw some points to colleagues and show them some ideas on how curves progress to illustrate some theory

댓글을 달려면 로그인하십시오.

답변 (1개)

Geoff Hayes
Geoff Hayes 2014년 5월 5일
You can try this: create a script called myplotter.m. Within this script, add the following code:
% close any open figures
close all;
% launch a new figure and click the mouse as many time as you want within figure
disp('Click the mouse wherever in the figure; press ENTER when finished.');
mousePointCoords = ginput;
% plot the mouse point coordinates on the figure
plot(mousePointCoords(:,1), mousePointCoords(:,2),'b.','MarkerSize',8);
For details on ginput, type help ginput. The above should be sufficient in getting you started on your problem.
  댓글 수: 5
Chance Emanuels
Chance Emanuels 2021년 12월 30일
@Jon How would I use the mousePointCoords to calculate the area within the points?
Jon
Jon 2022년 1월 4일
Hi Chance,
It has been awhile since I've worked on this. I'd have to review it myself to see what it is all about. Let me know if you are still looking for an answer on this. If it is really a new question, rather than just an extenstion of what's been posted, maybe it would be good to post it as a new question, to get other's input too.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by