Prev: SVM
Next: creating georeferenced grid
From: Roy Anati on 4 Jun 2010 16:27 I have a GUIDE application which contains an axis object which is used to display an image. For some reason the position of the axis is being determined by the property 'CameraPosition' and not 'Position', and I am unable to set the position of the axis properly. I added an annotation rectangle with the same 'Position' vector as the axis, and the annotation is positioned correctly. I also added a ButtonDownFcn on the axis object and found that the object really isn't where it's supposed to be (It's not a question of display), the callback does not run when I click on area the axis 'Position' property says it is. This does not happen if I just create a figure in Matlab and add an axis to it. Any help would be appreciated, Thank you.
From: Iman on 4 Jun 2010 17:49 "Roy Anati" <firstlast(a)seas.upenn.edu> wrote in message <hubnj9$ml7$1(a)fred.mathworks.com>... > I have a GUIDE application which contains an axis object which is used to display an image. > > For some reason the position of the axis is being determined by the property 'CameraPosition' and not 'Position', and I am unable to set the position of the axis properly. > > I added an annotation rectangle with the same 'Position' vector as the axis, and the annotation is positioned correctly. > > I also added a ButtonDownFcn on the axis object and found that the object really isn't where it's supposed to be (It's not a question of display), the callback does not run when I click on area the axis 'Position' property says it is. > > This does not happen if I just create a figure in Matlab and add an axis to it. > > Any help would be appreciated, > Thank you. I tried to create a gui with axes, and set a buttondownfnc, and seems working. It might be a good idea to open your gui with guide, open axes property inspector and make sure that the active position is set to position, and then set the position, by clicking on the + sign in the left of position box, to see x,y,width and height,, you can reset these value by clicking on each one and replace it with the required ones according the predefined unit (normalised, or pixels are frequently used). if your buttondownfun is only one word like (close), you can write it directly in the property inspector, otherwise add as @ myfunction , where myfunction is the function you want to excecute when you click on the axes area Good luck Iman
From: ImageAnalyst on 5 Jun 2010 00:54 You may find this informative: http://www.mathworks.com/support/solutions/en/data/1-1B03X/index.html?solution=1-1B03X "Why is the "ButtonDownFcn" callback for my axes not activated when I click on an object in the axes? "
From: Roy Anati on 6 Jun 2010 11:42 "Iman " <imanabdelhamid(a)yahho.com> wrote in message <hubscg$djk$1(a)fred.mathworks.com>... > "Roy Anati" <firstlast(a)seas.upenn.edu> wrote in message <hubnj9$ml7$1(a)fred.mathworks.com>... > > I have a GUIDE application which contains an axis object which is used to display an image. > > > > For some reason the position of the axis is being determined by the property 'CameraPosition' and not 'Position', and I am unable to set the position of the axis properly. > > > > I added an annotation rectangle with the same 'Position' vector as the axis, and the annotation is positioned correctly. > > > > I also added a ButtonDownFcn on the axis object and found that the object really isn't where it's supposed to be (It's not a question of display), the callback does not run when I click on area the axis 'Position' property says it is. > > > > This does not happen if I just create a figure in Matlab and add an axis to it. > > > > Any help would be appreciated, > > Thank you. > > I tried to create a gui with axes, and set a buttondownfnc, and seems working. > It might be a good idea to open your gui with guide, open axes property inspector and make sure that the active position is set to position, and then set the position, by clicking on the + sign in the left of position box, to see x,y,width and height,, you can reset these value by clicking on each one and replace it with the required ones according the predefined unit (normalised, or pixels are frequently used). if your buttondownfun is only one word like (close), you can write it directly in the property inspector, otherwise add as @ myfunction , where myfunction is the function you want to excecute when you click on the axes area > Good luck > Iman Dear Iman, Thank you for your response, but I have already tried it. The problem I am having is that the location of the axis is being determined by the camera property, not the position property (Active position is set to 'position'). Please disregard my comments regarding the buttondownfcn, that was a test to confirm that the axis was being positioned incorrectly (which it is).
From: Roy Anati on 6 Jun 2010 11:45 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <11e8c92d-e088-4a53-b718-695aac54228a(a)g7g2000yqj.googlegroups.com>... > You may find this informative: > > http://www.mathworks.com/support/solutions/en/data/1-1B03X/index.html?solution=1-1B03X > > "Why is the "ButtonDownFcn" callback for my axes not activated when I > click on an object in the axes? " Thank you for your replay, but you have misunderstood the problem. The problem I am having is that the position of my axis object is being determined by the 'cameraposition' property and not the 'position' property. Please disregard my comment regarding the buttondownfcn, that was to confirm that the object is indeed being positioned incorrectly, which is it. Thank you, Roy Anati
|
Pages: 1 Prev: SVM Next: creating georeferenced grid |