I want to replace the hyphens with en dashes in a plot axes.

 Risposta accettata

i suggest you have a look into the yticklabels() and xticklabels() and do some replacement of '-' with the en dash char(0x2013).
plot(-10:10);
yticklabels()
yticklabels(replace(yticklabels(),'-',char(0x2013)));
yticklabels()

2 Commenti

my pleasure. note that the effect vanishes if the ticks are changed or refreshed. This can also happen e.g. when you resize the figure

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by