Matlab plot buttondownfcn Using MATLAB 2018b. H Is there a way to keep the buttondownfcn running? I have tried using the "line" command instead of plot as a lower key plotting command, but doesn't work. First, load sample accident data and create the scatter plot. By default, data tips show the coordinates of the data point. However, when I try to set the ButtonDownFcn action of the plot, this default data tip functionality is disabled. Before plotting the data the three functions axesX_ButtonDownFcn() work, but when I plot the data they don't work anymore. The "ButtonDownFcn" callback for the child objects will be executed instead. How can I access the x-coordinate of a poi Apr 17, 2019 · I'm trying to access data from a line in a UIAxes in my app I'm building in App Designer, but I'm unable to set a ButtonDownFcn for a UIAxes. When I check the uiaxes object, the menu is added correctly. Learn more about plot, figure, callback, gui MATLAB Apr 5, 2023 · Is there a way to keep the buttondownfcn running? I have tried using the "line" command instead of plot as a lower key plotting command, but doesn't work. To use the callback, create the plot and left-click on a line. Jul 13, 2019 · I'm getting problems trying to use the ButtonDownFcn in a MATLAB plot. I have a simple line graph to which I want to attach a click function using ButtonDownFcn. How should I do it and where should I put the code, in the top button's callback or somewhere else? Mar 30, 2020 · Try creating a plot in the app's StartupFcn, then defining a ButtonDown callback as a nested function within that same StartupFcn. The axis Color properties don't make any difference Feb 16, 2016 · I showed up an image on axis, and I turned off 'HitTest' of that image, and it's still not working I'm using guide function Main_OpeningFcn(hObject, eventdata, handles, varargin) axes(ha Feb 18, 2023 · 今回は単純にplot関数を使用して説明するが、時間があればscatterにおけるコールバックも説明したい。 LineプロパティのButtonDownFcnにコールバック関数を指定 plot関数は返り値として Lineオブジェクト を返す。 Matlab - Deployed Program - ButtonDownFcn does not execute Asked 10 years, 10 months ago Modified 10 years, 10 months ago Viewed 141 times Jul 14, 2015 · Using this tutorial I have succeeded in making a crosshair follow the motion of my mouse when I click the left button. 9k次,点赞6次,收藏18次。本文介绍了如何在MATLAB中创建GUI,添加一个右键按钮,实现鼠标右击时的特定操作(如改变颜色),并在鼠标松开时恢复原样。详细步骤包括创建ButtonDownFcn回调函数和对应鼠标松开事件的处理函数。 Nov 29, 2012 · I have a GUI with 3 axes. The menu although does not show up when I right click in the created GUI. Z = ButtonDownFcn does not work on a plot. Googling hinted that ButtonDownFcn could be used, but examples I found require manually plotting each point and attaching a handler, like so: Jan 17, 2024 · With this setup, any click on the plotted line within the UIAxes will trigger the lineObjButtonDown method, capturing the clicked coordinates. ColorOrder is an m -by-3 matrix of RGB values that define the colors used by the plot and plot3 functions to color each line plotted. What I want to do is assign a function to lines in a plot. How can we draw such a figure in which if you click at a subplot of the figure, that subplot will get enlarged and pop up in new figure window? What function shall be employed? Supp I'm trying to access data from a line in a UIAxes in my app I'm building in App Designer, but I'm unable to set a ButtonDownFcn for a UIAxes. Learn more about buttondownfcn, push button, click, datacursormode, subplot, figure Obtain data points from plot using Learn more about buttondownfcn, video processing, image processing, callback, functions MATLAB Jul 18, 2014 · ButtonDownFcn / need some explanation. Learn more about buttondownfcn, push button, click, datacursormode, subplot, figure Nov 19, 2021 · How do I use the "ButtonDownFcn" for a plot in App Designer? I am not sure how or, more importantly, where to define the callback function. g. Jan 30, 2023 · I have a plot on a GUIDE GUI that gives some measurement made from frames in a video. Cree la función de callback que MATLAB ® ejecuta cuando los usuarios hacen clic con el botón principal en el objeto de gráficas. Jun 11, 2024 · I am struggling with figuring out how to pass variables from a callback function (using ButtonDownFcn) to my main script. However, when I try to set the ButtonDownFcn of the plot, this default data tip Aug 12, 2019 · To return the coordinate selected by a mouse click, you can assign a ButtonDownFcn to the plotted object handle. What my user wants is to click on a point in the plot and display the frame from the video that corresponds to Oct 28, 2015 · An annoying side-effect of Matlab figure uimodes (zoom, pan and rotate3d) is that they disable the user’s figure-wide callbacks (KeyPressFcn, KeyReleaseFcn, WindowKeyPressFcn, WindowKeyReleaseFcn, WindowButtonUpFcn, WindowButtonDownFcn and WindowScrollWheelFcn). The Problem: I want to give the user the possibility to click multiple times in a row. They enable users to interactively click on a plot location and see a tool-tip that contains the clicked location’s coordinates. Jun 19, 2018 · I understand this is a standard MATLAB plot function, which, presumably works inside an app. Create the callback function that MATLAB ® executes when users left-click on the graphics object. Jul 18, 2014 · Hey Guys, I ve read a lot of stuff for the last 2 hours but I still dont know how to use the Function. Jun 17, 2021 · My goal is to create a function that run everytime a new datatip is selected. Learn more about plot, figure, callback, gui MATLAB Jul 26, 2021 · Before plotting the ButtonDownFcn works well but after plotting nothing happen. I want to do many things with that function, for exampel saving the datatips to an array or showing the last selected datapoint in the label below. Dec 17, 2018 · Change the axes NextPlot property to 'replacechildren' to avoid this, or set the ButtonDownFcn after calling PLOT, or use the low-level LINE function instead of the higher-level PLOT function. The expression executes in the MATLAB workspace. That would involve assigning a ButtonDownFcn to the scatter object. Right now I'm left needing to return to the toolbar to toggle zoom mode; I'd much rather just move the mouse between the different axes and have the appropriate behavior activate programmatically. Trying to make a multi-line plot using uiaxes in app designer, and then to add callbacks to the lines. Jul 25, 2014 · Is the ButtonDownFcn property of axes1 definitely set to this function in GUIDE? If the axes is transparent (Color == 'none') it won't receive clicks (they go through to the figure underneath). Here is a call to the plot function that creates line graphs and defines a button down callback for each line created. Mar 22, 2024 · Currently, the "ButtonDownFcn" callback does not have the functionality to enable data tip interaction. I click on the top button to load an image, then an image is loaded on the left with a single blue colour (to make things super simple), then I am hoping to apply the buttondown function on this image on the left. I have a GUI with 3 axes. Jul 2, 2020 · Obtain data points from plot using Learn more about buttondownfcn, video processing, image processing, callback, functions MATLAB This MATLAB function allows you to identify the coordinates of n points within Cartesian, polar, or geographic axes. When I create the plot wit Apr 25, 2020 · I am looking into enabling hover and click actions for a plot in Matlab. The displayed tooltip text is even customizable using documented properties of the datacursormode object. Learn more about plot, figure, callback, gui MATLAB Jun 11, 2024 · I am struggling with figuring out how to pass variables from a callback function (using ButtonDownFcn) to my main script. 今回はAppDesignerを使って,マウスでオブジェクトを動かすプログラムを紹介する. その1:四角形のpatchオブジェクトを動かすプログラム ← この記事 その2:上記 Colors to use for multiline plots. Learn more about plot, figure, callback, gui MATLAB Nov 29, 2012 · I have a GUI with 3 axes. i have a button DELETE May 20, 2013 · I have a project of "Optical Character Recognition" in MATLAB and i need your help: how do i recognize when the user press the mouse on an image? i trying to do this with ButtonDownFcn but even whe Apr 13, 2012 · Define this routine as a string that is a valid MATLAB expression or the name of a code file. Nov 19, 2021 · You are correct that there is no "ButtonDownFcn" for a UIAxes. In the Command Window, plot some data on an axes object using the scatter function. Jul 5, 2016 · 文章浏览阅读9. (Figurename = Plo Mar 4, 2013 · 2 Goal: To perform several clicks in one figure, containing an image displayed with imshow and save the coordinates of the "clicked" point (s), to be used in further operations. Similarly if you click on e. but i want to select a line of the axes. 4k次,点赞6次,收藏18次。本文详细解析了Matlab GUI中单击事件的工作原理,包括如何使用set函数为对象设置ButtonDownFcn属性来响应用户的单击操作。此外,还介绍了如何正确处理不同控件上的单击事件,特别是当图片覆盖在axes控件上时如何确保单击事件能够正常触发。 Modify the contents of data tips on a scatter plot. However I have only been able to do this in a regular figure, and have had problems implementing it on my GUI. Nov 21, 2019 · How do I use the "ButtonDownFcn" for a plot in App Designer? I am not sure how or, more importantly, where to define the callback function. To enable the data tip interaction functionality in MATLAB R2023a, consider using the "Hit" event instead of a "ButtonDownFcn". ButtonDownFcn does not work on a plot. Jul 1, 2020 · Obtain data points from plot using Learn more about buttondownfcn, video processing, image processing, callback, functions MATLAB. , and its handle is s. I have tried this but doesn't work: Apr 20, 2018 · Hi,all. Aug 18, 2023 · ButtonDownFcn does not work on a plot. This method is intended to be used within the ButtonDownFcn callback of an Image or Axes object. No idea how to adjust this. i have tried with buttondownfcn. Is this possible using ButtonDownFcn? (see the following code) Create the callback function that MATLAB ® executes when users left-click on the graphics object. Apr 26, 2024 · I wonder if this was in reference to plots generated with plotyy? I have recently generated a case where the legend box is opaque with respect to the left hand plots and transparent with respect to the right hand plots. Mar 17, 2017 · I want to generate a scatter plot with datacursormode object enabled and custom UpdateFcn callback for the datacursormode object . Button down callbacks execute when users left-click on the graphics object for which the callback is assigned. Apr 17, 2019 · I'm trying to access data from a line in a UIAxes in my app I'm building in App Designer, but I'm unable to set a ButtonDownFcn for a UIAxes. In the callback function, you can create a new figure and plot the data from the selected subplot. These events will trigger a function if you define the buttondownfcn of the line or the windowbuttonmotionfcn of the figure. The drawing starts at location (x, y) in the axes. Learn more about plot, figure, callback, gui MATLAB Mar 26, 2025 · Hi Ajeya, The required functionality can be achieved in MATLAB by using the “ButtonDownFcn” property of each subplot which allows you to define a callback function that is executed when you click on the subplot. Mar 3, 2021 · Trying to get my head around Matlab's handling figure interactions. Is there a way to keep the buttondownfcn running? I have tried using the "line" command instead of plot as a lower key plotting command, but doesn't work. Before plotting the data the three functions axesX_ButtonDownFcn () work, but when I plot the data they don't work anymore. I am using this code in: function axes2_ButtonDownFcn(hObject, eventdata, handles) handles. With the ButtonDownFcn callback, clicks will only be recorded if the user touches the plot line itself. May 22, 2014 · A callback is a function that gets called when you perform certain actions. The anonymous function accepts the source and event arguments that MATLAB passes to the callback and then calls the displayCoordinates function with the required inputs. I want to read the value of the plot and send it to editText field when I press mouse button over the plot. If you do not specify a line color with plot and plot3, these functions cycle through the ColorOrder to obtain the color for each line plotted. More info on this behavior here: Matlab Answers I could not get the button down function to work, but the following code works on R2019a using a key press as the event. Learn more about buttondownfcn, plot, figure MATLAB Sep 2, 2020 · I am wanting to identify the xdata for a data point when the user clicks on the data point in a plot. We would like to show you a description here but the site won’t allow us. but it doesn't work. Please see the following code snippet for an example. How do I use the "ButtonDownFcn" for a plot in App Designer? I am not sure how or, more importantly, where to define the callback function. May 14, 2022 · 概要 MATLABにはAppDesignerという簡単にGUIアプリを作れる優れた機能がある. I used the c key, but you 创建用户左键点击图形对象时 MATLAB ® 执行的回调函数。 分配将回调函数引用到对象 ButtonDownFcn 属性的函数句柄。 Jun 3, 2011 · Trouble with ButtonDownFcn and Hittest in GUIDE. May 25, 2016 · I've discovered that when the zoom tool is activated, the buttondownfcn callback is not triggered by clicking on the text objects. Notes: I know about the functions getpts / ginput but I would like to perform this without using them. Variable amount of checkboxes in listbox. How can I access the x-coordinate of a poi Oct 20, 2005 · Hi all, I have a problem while using ButtonDownFnc callback with an axes. Obtain data points from plot using Learn more about buttondownfcn, video processing, image processing, callback, functions MATLAB Jul 18, 2014 · ButtonDownFcn / need some explanation. Now when I click on the scatter plot, I want all the datatips to g Nov 18, 2021 · Here is what I would like to achieve. Jul 1, 2020 · Obtain data points from plot using Learn more about buttondownfcn, video processing, image processing, callback, functions MATLAB Hi, I have a GUI with 3 axes. a line or image in the axes, the click event goes to that object, rather than the axes itself. Learn more about structure-from-motion, computer-vision, camera-function beginDrawingFromPoint(ROI,[x y]) enters interactive mode to draw the shape for object ROI. 使用 MATLAB App Designer 设计交互界面,UIFigure 对象有两种 添加回调函数的方式 (1)直接 ButtonDownFcn(2)WindowButtonDownFcn其中,UIFigure 的 WindowButtonDownFcn 函数是当鼠标在 UIFigure 中点击时(… Obtain data points from plot using Learn more about buttondownfcn, video processing, image processing, callback, functions MATLAB Aug 18, 2023 · ButtonDownFcn does not work on a plot. Jun 2, 2011 · GUI ButtonDownFcn for clicking on axes. I'm trying to access data from a line in a UIAxes in my app I'm building in App Designer, but I'm unable to set a ButtonDownFcn for a UIAxes. To add a ButtonDownFcn callback in GUIDE, select View Callbacks from the Layout Editor View menu, then select ButtonDownFcn. Asigne un identificador de función que remita la función de callback a la propiedad ButtonDownFcn del objeto. Aug 7, 2022 · I currently have a plot that has a custom data tip. Thus, stick to using the "ButtonDownFcn" with your plot object. mathworks. Learn more about plot, figure, callback, gui MATLAB May 2, 2023 · How do I move and resize the actual figure size (with the axis and data) within the popup window that appears when plotting? I want to make the popup figure window full screen, which I do through Feb 27, 2017 · There is a plot that my code generates and I want to click on the plot and have some code execute. May 1, 2009 · Matlab’s uicontrol handles normally expose only a few event callbacks. Is there any way to overcome this WITHOUT setting the 'enabled' property of datacursormode object to off? Aug 18, 2023 · ButtonDownFcn does not work on a plot. html. Learn more about plot, figure, callback, gui MATLAB May 29, 2015 · I want to create a GUI, in which i plot a histogram into an axes. *The Problem:* My GUI reads Data and plots it in a new figure as subplot. Enable or disable rotate mode, and set other basic options, by using the rotate3d function. The problem is when I try to use buttondownfcn I get a message saying there may be some incompatibility with UIFigure objects, which is what the object is classified as when AppDesigner creates it. Apr 23, 2025 · こんにちは,道家です.新年度・新学期も始まり,もうそろそろゴールデンウィークという時期ですが,新しい環境に入られた方は慣れてきましたでしょうか?さて先月,トレーニングチームの遠藤さんが執筆した MATLAB グラフィックス オブジェクトの記事 いかがでしたでしょうか.私にとっ This MATLAB function creates a push button (the default user interface control) in the current figure, and returns the UIControl object. Assign a function handle that references the callback function to the ButtonDownFcn property of the object. Feb 6, 2013 · What I have done is to set the ButtonDownFcn (CallbackA) of axes, and the WindowButtonDownFcn (CallbackB) of the figure. Learn more about buttondownfcn, hittest, guide, button down function, hit test, gui MATLAB Mar 12, 2023 · Learn more about gui, mapshow Mapping ToolboxWhy after plotting on axes the ButtonDownFcn. When the line is clicked I want the x- Oct 27, 2021 · In question 1, you want a function that responds to pressing a scatter plot object. 3) What does this syntax mean? My interpretation (possibly in error) is the following: @ signifies the handle to an anonymous inline function, but what is argument 'e', Is it another handle? Is it assigned to the display function? ButtonDownFcn does not work on a plot. If you turn off datacursormode the ButtonDownFcn will work. When pan mode is enabled, pan the view of the axes using the cursor or the keyboard. For instance, you might want something to happen when you click on a line in MATLAB, or when you move the mouse in MATLAB. Mar 17, 2017 · The issue that I am facing is that the ButtonDownFcn isn't being executed when the datacursormode object is enabled. In questions 2 and 3, you want a datatip to appear when you click a scatter object which would prevent use of the ButtonDownFcn (you can't have both). Here's a complete demo that returns the entire (x,y,z) coordinate you selected. Specify the ButtonDownFcn callback property of the Scatter object using an anonymous function. Learn more about gui, axes, double click MATLAB Aug 4, 2014 · I have a Gui, that it has an axesIn the axes i can draw lines with plot. Matlab nicely has the builtin feature of viewing the data tips when hovering on a point in a plot. So you either use the hold function (which affects the NextPlot property), or simply set the axes ButtonDownFcn callback after image / imagesc / imshow are called. For example, you can create a ButtonDownFcn callback for a figure to program a response to a user clicking the figure. Dec 12, 2022 · I think the issue here is that Matlab overrides the ButtonDownFcn listener when datacursormode is enabled (zoom, pan and rotate3d as well). Jun 3, 2011 · Trouble with ButtonDownFcn and Hittest in GUIDE. Apr 5, 2023 · Is there a way to keep the buttondownfcn running? I have tried using the "line" command instead of plot as a lower key plotting command, but doesn't work. Googling hinted that ButtonDownFcn could be used, but examples I found require manually plotting each point and attaching a handler, like so: Apr 20, 2012 · This question is related to Matlab: Plot points and make them clickable to display informations about it but I want to run a script, not just pop up data about the clicked point. That is fine with me as I use CurrentPoint currently. Matlab Buttondownfcn matlab buttondownfcnUsing ButtonDownFcn w/ mapshow () in GUI. For example, pan on enables pan mode, pan xon enables pan mode for the x -dimension only, pan yon enables pan mode for the y -dimension only, and pan off disables pan mode. Sep 17, 2025 · Use ‘ButtonDownFcn’ instead of 'WindowButtonDownFcn' for detecting when a particular plot object was clicked since this is a more direct approach and you won’t have to manually check the object being clicked that way Inside the ‘ButtonDownFcn’ callback, enable the corresponding figure’s ‘WindowButtonMotionFcn’ and ‘WindowButtonUpFcn’ to handle the actual drag and release Aug 22, 2023 · 文章浏览阅读3. I'm assuming the Sep 14, 2011 · Plot data tips are a great visualization aid for Matlab plots. I'm in the opposite situation than you Matt. Aug 13, 2009 · Matlab listbox uicontrols enable basic mouse support, by exposing the ButtonDownFcn callback property. Sep 10, 2014 · Heyho, the function [x,y]= ginput (n) gives back the x and y data of the curse position while clicking. plot data tips A client has recently asked me to automatically display an attached data-tip to Dec 26, 2007 · This is the next in a series of advanced topics in MATLAB. I c Nov 19, 2021 · How do I use the "ButtonDownFcn" for a plot in App Designer? I am not sure how or, more importantly, where to define the callback function. As explained here, high-level plotting functions actually clear the axes properties when called. I tried changing the "ButtonDownFcn" property for the axis, but the UIAxes in App Designer does not have any callbacks. Within the ButtonDownFcn you can determine which of your coordinates were closest to your mouse-click and then return that coordinate. Apr 28, 2015 · I think at this point I'm not familiar enough with MATLAB/GUI to understand your suggestion properly. How can I access the x-coordinate of a poi Jun 27, 2009 · An axes' "ButtonDownFcn" callback is only executed when you click on the axis itself, not the objects in the axis. I'm sure there's a tutorial on it somewhere, but after a few hours of poking around, I can't figure out how to get the myData that is updated by changing the ROI out of the listener and into the main workspace Jul 13, 2019 · I'm getting problems trying to use the ButtonDownFcn in a MATLAB plot. In contrast, the underlying Java control exposes many more callbacks: 26 standard callbacks, plus a few control-specific callbacks, as follows: Jun 22, 2021 · Why does the UIAxesButtonDown callback function Learn more about uiaxesbuttondown MATLAB Apr 20, 2012 · This question is related to Matlab: Plot points and make them clickable to display informations about it but I want to run a script, not just pop up data about the clicked point. These are ‘CreateFcn’, ‘DeleteFcn’, ‘ButtonDownFcn’, ‘KeyPressFcn’ and the control-specific ‘Callback’. To further control rotate mode behavior, return and use a rotate3d object. Nov 29, 2012 · I have a GUI with 3 axes. ButtonDownFcn プロパティに関数ハンドルを代入する場合、その関数は MATLAB path で設定しておかなければなりません。 コールバック関数で使用される値は次のとおりです。 Aug 17, 2012 · The following example implements drag and drop functionality for a text box that is displayed on a Figure Window. . Two and a half minute video shows how to use buttondownfcn to get the current point. Apr 15, 2020 · Hello, Matlab nicely has the builtin feature of viewing the data tips when the mosue hovers on a point in a plot. I tried specifying the axes I want it to show on, because my GUI, made with GUIDE, has three axes figures, but it will show on the whole window. Learn more about buttondownfcn, hittest, guide, button down function, hit test, gui MATLAB pan option sets the pan mode for all axes in the current figure. My goal is to be able to have the user click on a point on the plot (which displays the datatip) and be able to store the coordinate of the datat Apr 17, 2019 · I'm trying to access data from a line in a UIAxes in my app I'm building in App Designer, but I'm unable to set a ButtonDownFcn for a UIAxes. Below is a simple example where I am trying to modify the example script from: https://nl. I hope this is not too much too ask for, but if I just created a ButtonDownFcn (empty) for the Axes itself and plot a graph like in the following code. Now when I click on the scatter plot, I want all the datatips to g I have a GUI with 3 axes. Dec 5, 2023 · MATLAB でのマウスクリックは、Figure、Axes、各 plot それぞれでキャプチャーを行うことができます。 専用のコールバックが定義されているので、そこに処理用の関数もしくは処理そのものを定義して使います。 Feb 1, 2023 · My problem is calling out of the listener to get the data to update in the workspace. How can I access the x-coordinate of a poi You can use rotate mode to explore data by interactively rotating the 3-D view of the axes. Dec 15, 2021 · FWIW, I test to plot both coordinates returned by CurrentPoint and IntersectionPoint on the same axes and in all the cases CurrentPoint can correctly follow the mouse and IntersectionPoint cannnot. So you did something like this? Nov 11, 2024 · In the CreateFcn I define a uicontextmenu and add it to the uiaxes defined in the setup method. For this axes, I want a button down function to react in certain ways, depending on what bin of the histogram I am clicking at. Sep 17, 2025 · Use ‘ButtonDownFcn’ instead of 'WindowButtonDownFcn' for detecting when a particular plot object was clicked since this is a more direct approach and you won’t have to manually check the object being clicked that way Inside the ‘ButtonDownFcn’ callback, enable the corresponding figure’s ‘WindowButtonMotionFcn’ and ‘WindowButtonUpFcn’ to handle the actual drag and release Dec 26, 2007 · This is the next in a series of advanced topics in MATLAB. Learn more about gui, listbox, checkbox, variable. In most cases, users will indeed expect the mouse and keyboard behavior to change when these modes are active (selecting a zoom Create the callback function that MATLAB ® executes when users left-click on the graphics object. This example function is also attached as a MATLAB-file: Feb 3, 2021 · plotCamera: ButtonDownFcn usage. When set, this callback is activated whenever a mouse button (left or right-click) is pressed within the listbox confines. My definition of “Advanced” is somewhat nebulous and arbitrary, so even newer users can give this a watch. Here is the function with plot. Jul 10, 2018 · Create a new figure when using ButtonDownFcn. This topic contains examples of writing callbacks for graphics objects such as Line, Axes, or Figure objects. Next, we need to disable the ButtonDownFcn callback any time an AxesToolbar button (like pan or zoom) is turned on. These values will be displayed both in the MATLAB command window and as a title on the plot itself for immediate reference. com/help/images/measure-distances-in-images. Then, create a data tip interactively or by using the datatip function. Nov 19, 2021 · How do I use the "ButtonDownFcn" for a plot in App Designer? I am not sure how or, more importantly, where to define the callback function. Learn more about plot, figure, callback, gui MATLAB Jan 12, 2019 · OK I've lost way too many hours on this one. How can I access the x-coordinate of a poi Aug 18, 2023 · ButtonDownFcn does not work on a plot. Mar 23, 2012 · In your GUI, create cases in the BUTTONDOWNFCN of the UICONTROL/FIGURE OBJECT based on the value of 'SELECTIONTYPE' that you desire so that you can place code for action after left or right clicks in the appropriate case. For this I am running a function from within a plot command Is there a way to keep the buttondownfcn running? I have tried using the "line" command instead of plot as a lower key plotting command, but doesn't work. The documentation seems to be a bit contradictive in this sense, so it's hard to understand exactly what I should do. This can be a fundamental skill that underlies many advanced GUIs. zhroffr fqoi jnhr tmen dme qocphgk eghk gsnpd lxi ecrxnv rvel shawti salbdq frdd ikyufas