Restore Default Font Colors of Figures
Afficher commentaires plus anciens
Hi All,
I did something that was rather unfortunate when scouring code in mathworks, while trying to understand what some code did, I was typing it into my command line a while ago. In the process it changed my default coloring of the background of my figure (which I promptly fixed), and global text color in matlab.
This is a current example of the figure is the png attachment 'Alexa_t_AllCells.png'. and the 'XandYColorChange.png' is an example of what I am looking for on a global scale. My code for making the figure is rather simple: see below.
figure
heatmap(log10(T_Alexaheat), table2cell(U_3), table2cell(U_3), ...
'%0.2f', 'TickAngle', 45, 'Colormap', redblue(30), ...
'Colorbar', true)
title('Log 10 Relationships of Median T_{1/2} Alexa Note: (x/y)')
%% this is for the second picture %%
ax = gca;
ax.XColor = 'k';
ax.YColor = 'k';
I figured a simple
set(groot, 'defaultFontColor' or 'defaultTextColor', 'k')
or
reset(gcf)
would get me to what I need, but that doesn't work. The second picture is not correct either, as I need the color bar and title to be readable, and I do not want to have to repeat the same code for every figure I create from hereon.
How does one fix this? (note that groot, defaultTextColor, 'k' will only cause the title to become black, not the axes nor the color bar follow suite)
Thanks,
Nick
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Graphics Object Properties dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!