Hi there, I want to show only one x axis value (on 0 value) bold character in my x-axis. I already draw a vertical line on zero value by xline(0) command. Thanks in advance!
17 ビュー (過去 30 日間)
古いコメントを表示
Mustafa Deniz Altinkurt
2022 年 5 月 13 日
コメント済み: Mustafa Deniz Altinkurt
2022 年 5 月 16 日
Here is part of the code. Only want to make only "0" value to show in bold character on x-axis (leaving the other values normal). Somehow couldn't find a solution.
...
hold on
xlabel("Crank angle (°)");
ylabel("Pressure (bar)");
title("Single vs. Split Injection (1200 bar)");
xlim([-40 40]);
xticks(-40:20:40);
xline(0,'--');
hold off
0 件のコメント
採用された回答
dpb
2022 年 5 月 13 日
編集済み: dpb
2022 年 5 月 13 日
You'll have to write the tick labels manually; can't change the characteristics of individual tick labels as they're just text strings interpreted by the active TickLabelInterpreter (TeX by default)
xtl=xticklabels; % retrieve present tick labels
xtl{1}=strcat('\bf',xtl{1}); % prepend the boldfont TeX control sequence on first label
xticklables(xtl) % write 'em back...
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Labels and Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!