How to set up XAxisLocation while opening my GUI
Ältere Kommentare anzeigen
Hello all,
Im relative new to Matlab programming so my apologizes for this silly question if so. I have searched all over Mathworks and google but i dont seem to get what I need.
I have a small GUI which draws some vectors in Axis. I want my X and Y axes location to be at the origin. This happens only after I press a button which draws my vectors in the Axis UI. But I would like to see my X and Y axes at the origin when I start the GUI. So even I dont have any vector and havent done anything except starting the GUI I see my X and Y axes in the origin and have 4 quadrants.
I think I have to set this up somewhere during opening and I used this line:
% --- Executes just before LEICIE is made visible. function LEICIE_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to LEICIE (see VARARGIN)
% Choose default command line output for LEICIE handles.output = hObject;
% Update handles structure guidata(hObject, handles);
% UIWAIT makes LEICIE wait for user response (see UIRESUME) % uiwait(handles.figure1); global V1 global I1 global PF1 global Angle1
set(gca.axes1,'XAxisLocation','origin');
But this doesnt seem to work. Could anybody help me a bit please
Thanks in advance
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

