Greek letters and label alignment in boxplot graph
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
in three slightly different models I have calculated the results for the same 5 sets of parameter combinations and would like to display the results in a boxplot graph. This works so far well but the tick-labeling of the x-axis does not look nice for two reasons:
1) I cannot get the labels to show the real greek symbols
2) It would probably look nicer if the parameter set label (Base Case, etc.) would either be centered under the three respective graphs or at least left aligned with "M1"
Would be very thankful for any hints or advice!
Best regards
Christian
Here is the code as well as the graph it produces:
% Output of models: first column are results for 10.000 simulations of first parameter set,
% second column results of 10000 simulations of second parameter set, etc.
Model_1 = rand(10000,5);
Model_2 = rand(10000,5);
Model_3 = rand(10000,5);
DataforBoxplot = cat(2,Model_1, Model_2, Model_3); % Combine model data in one matrix
figure('units','normalized','outerposition',[0 0 1 1])
Parameterset = repmat({'Base Case' 'Case \alpha' 'Case \beta' 'Case r' 'Case \gamma'},1,3);
Modellabel = [ repmat({'M1'},1,5) , repmat({'M2'},1,5) , repmat({'M3'},1,5) ];
boxplot(DataforBoxplot, {Parameterset, Modellabel}, 'factorgap', [10 0], 'labelverbosity', 'minor')
title('Example graph')
ylabel('Model output')
xlabel('Model (1-3) and parameter set used')
0 Commenti
Risposta accettata
Thorsten
il 25 Nov 2015
To get Greek letters
Parameterset = repmat({'Base Case' ['Case ' char(945)] ['Case ' char(946)] 'Case r' ['Case ' char(947)]},1,3)
6 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Labels and Annotations in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!