plot - 在 Octave 的多线绘图标签中更改一行的字体大小
问题描述
是否可以使用 ylabel 命令更改多行绘图标签中一行文本的字体大小。如果有怎么办?
PS:我使用的是 Octave 5.2
我尝试了下面的代码,但它给了我一个错误。
figure
plot((1:10).^2)
ylabel_txt1=strcat('1st line of text with smaller font') %1st line
ylabel_txt2=strcat('2nd line of text') %2nd line
ylabel({(ylabel_txt1,'fontsize',13) ;ylabel_txt2})
解决方案
由于要求澄清,因此将我的评论扩展到答案。
希望代码是不言自明的:)
ylabel_txt1 = '1st line of text with smaller font'; % 1st line
ylabel_txt2 = '2nd line of text'; % 2nd line
F = figure()
Ax1 = axes()
Ax2 = axes()
% create Ax2, make everything invisible except for ylabel
axes( Ax2 )
set( Ax2, 'color', 'none', 'xcolor', 'none', 'ycolor', 'none' )
ylabel( {ylabel_txt2, ' ', ' ', ' '}, 'fontsize', 16, 'color', 'k' );
% now 'create' Ax1 on top of Ax2
axes( Ax1 )
plot( (1:10) .^ 2 )
ylabel( ylabel_txt1, 'fontsize', 13 );
推荐阅读
- python - 图例位置和比例值字体大小pygal python
- javascript - Angular:单击浏览器后退按钮将用户带回家
- java - 将 datainputstream 中的数据写入 Java 中的文件
- c# - 单击 asp:RadioButton 时如何调用方法?
- android - 使用默认拨号器应用程序取消拨出电话
- microsoft-graph-api - 创建 onenote 页面失败,出现 404
- mysql - 想要在左连接选择中匹配 id 的值
- python - 用 BeautifulSoup 解析一些 HTML 代码
- php - 运行此示例时,浏览器上显示意外的奇怪代码
- vba - 使用循环vba对多个范围进行排序