Thread Subject: Tricky Logo Problem

Subject: Tricky Logo Problem

From: Dima

Date: 1 Nov, 2011 11:44:30

Message: 1 of 1

Hello!
I am trying to have the plotted data to run below the logo words which are imported inside the zero-backgrounds png file....SO far I have managed to import this file and set the background to be white but it does show up as a white rectangle around the logo when there are many time series on the chart. I wonder how this can be done.... I use the following code:


% Test Code to set a logo into figures(plots and graphs)
clear
close
% create the plot/graph
plot(rand(20));
% GET handle to current axes and move the plot axes to the bottom
ha =gca;
uistack(ha,'bottom');
% set(figure(1),'PaperUnits','inches','PaperPosition',[0 0 20 10])

% % Creating a new axes for the logo on the current axes
% % To create the logo at the bottom left corner of the plot use
% % the next two lines
haPos = get(ha,'position');
ha2=axes('position',[haPos(3:4), .1,.05,]); %ha2=axes('position',[haPos(1:2), .1,.04,]);

% set(figure(1),'OuterPosition',[0 0 2 2]);

% To place the logo at the bottom left corner of the figure window
% uncomment the line below and comment the above two lines
% ha2=axes('position',[0, 0, .1,.04,]);

% Adding a LOGO to the new axes
% The logo file(jpeg, png, etc.) must be placed in the working path
[x, map]=imread('transparent_logo.png','BackgroundColor',[1 1 1]);
image(x)
% Setting the colormap to the colormap of the imported logo image
colormap (map)
grid;

% Turn the handlevisibility off so that we don't inadvertently plot
% into the axes again. Also, make the axes invisible
set(ha2,'handlevisibility','off','visible','off')
print -dpng logofull2.png -r250

% figure100 = figure('Position',[1 1 1100 500],'Color',[1 1 1]);
% plot(1:10,sin(1:10));
% grid;
% saveas(figure100,'figure100','emf');

% export_fig figure100.png -m2.5

the logo file is here:
http://imageshack.us/photo/my-images/148/transparentlogo.png/

Thanks!!

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com