Effacer les filtres
Effacer les filtres

How to make trasparent the background of the static text.

71 vues (au cours des 30 derniers jours)
Jhon Rackham
Jhon Rackham le 16 Sep 2019
Modifié(e) : cui,xingxing le 27 Avr 2024
Hi guys, i'm working on GUIDE and i want to make transparent the background of the static text, is it posible?
indicaciones.png

Réponse acceptée

Adam Danz
Adam Danz le 16 Sep 2019
When you set the BackgroundColor of a static text box to "none", a black patch appears rather than transparency.
As a workaround, instead of a static text box you can open GUIDE and add a Axes in its place. After adding the axes, right click on the axes and select "property inspector"; scroll down to "Visible" and de-select the checkbox (visible = off).
Save, and close the GUI. Open the m-file and go to the opening function ("..._OpeningFcn"). Within the opening function you can set the text and specify the axes handle in the first input:
text(handles.axes1,.5,.5,'StaticTextHere','FontSize', 14,...
'HorizontalAlignment','Center','VerticalAlignment', 'middle') %this centeres the text in the invisible axes

Plus de réponses (1)

cui,xingxing
cui,xingxing le 30 Août 2021
Modifié(e) : cui,xingxing le 27 Avr 2024
x = 0:.1:2*pi;
y = sin(x);
figure;
plot(x,y,'LineWidth',4);
text(1,0,'Transparent background image','color','red')
% save to transparented image
set(gcf, 'color', 'none');
set(gca, 'color', 'none');
exportgraphics(gcf,'transparent.eps',... % since R2020a
'ContentType','vector',...
'BackgroundColor','none')
-------------------------Off-topic interlude, 2024-------------------------------
I am currently looking for a job in the field of CV algorithm development, based in Shenzhen, Guangdong, China,or a remote support position. I would be very grateful if anyone is willing to offer me a job or make a recommendation. My preliminary resume can be found at: https://cuixing158.github.io/about/ . Thank you!
Email: cuixingxing150@gmail.com

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by