how to insert "Filled Triangle" as text box in a Matlab figure?

8 visualizaciones (últimos 30 días)
vidyadhar k
vidyadhar k el 22 de Abr. de 2018
Respondida: Rik el 22 de Abr. de 2018

I would like to insert a filled triangle as a text box on a Matlab figure. I am using the following code. But it is giving an error as : Warning: Error updating TextBox. Character vector must have valid interpreter syntax: $\blacktriangle$

% Create textbox
annotation(figure1,'textbox',...
    [0.142384388807069 0.314861460957179 0.0372916053019146 0.0730478589420656],...
    'Color',[0 0 1],...
    'String','$\blacktriangle$',...
    'LineStyle','none',...
    'Interpreter','latex',...
    'FontSize',24,...
    'FitBoxToText','off');

Respuestas (1)

Rik
Rik el 22 de Abr. de 2018

You need the amssymb package to render this symbol. With some digging you should be able to add this package to your Matlab copy, but you should be aware that in that case your code is no longer portable to another copy of Matlab, unless that one has amssymb as well.

Categorías

Más información sobre Graphics Object Properties en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by