Hi, I am having trouble adding subscripts and supercripts to the axis labels on my heatmap. At the moment my code looks like this:
heatmap(string(round(log10(range_par_N),2)),string(round(log10(range_par_C2),2)),heatmap_data_Nconc,'CellLabelColor','none','GridVisible','off');
colormap(parula);
xlabel('log K^{N}_{N}');
ylabel('log K^N _C2');
But the axis labels look like this:
I have also tried doing:
heatmap(string(round(log10(range_par_N),2)),string(round(log10(range_par_C2),2)),heatmap_data_Nconc,'CellLabelColor','none','GridVisible','off');
colormap(parula);
h = xlabel('log K^{N}_{N}');
set(h,'Interpreter','tex');
But I get the following error:
Error using matlab.graphics.chart.Chart/xlabel
Output arguments are not supported when using xlabel with heatmap.
Error in xlabel (line 32)
hh = xlabel(ax,args{:});
The subscript and supercript work fine in the 'tex' style for all my other plots, but doesn't work for heatmap. Is it just that these are not suported for heatmaps?
I am using version R2018b.
I am new at using Matlab, so apologies if I have missed something obvious.