How to show a image logo in axes?

A
annabelletaylor · Aug 28, 2020 · 1.9K views
Question
i want to show the logo off my school at the top off the window in my project. i must define the axes function like this? this isn't correct, how do i set the position ?   h = axes('style','axes',... 'units','pix',... 'position',[10 20 180 30],... 'string' , 'ISEP' , ... 'callback',{@ax_call,S}); the function: function [] = ax_call(varargin) h = guided (gcbf); set(0,'userdata',h); % Save it in the root. imshow ( 'ISEP.jpg' )
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Aug 25, 2026

The position is correct, but AXES obejcts do not have the properties 'String' and 'Callback'. In addition you cannot and need not set the 'Style' of an AXES. Saving the handle of the figure in the root's UserData is not useful here.

 

Img = imread('ISEP.jpg');
ImgSize = size(Img);
AxesH = axes('Units', 'pixels',...
             'position', [10 20 180 30], ...
             'YDir', 'reverse', ...
             'XLim' , [0, ImgSize (2)], ...
             'YLim' , [0, ImgSize (1)], ...
             'NextPlot', 'add', ...
             'Visible', 'off');
image(Img, 'Parent', AxesH);

The Y-direction of images is reverted. Perhaps the limits should be [1, ImgSize(2)] instead of a 0.

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!