首页 > 解决方案 > 八度图未在 pdfcairo 中正确打印

问题描述

我正在尝试处理subplot我的数据,但以 PDF 格式打印会带来我无法使用的结果:标题和 x 轴标题被剪切(图例的框被图形覆盖,但我可以用其他位置处理)。我必须使用 gnuplot 和 pdfcairo,因为其他 seup 不适用于特殊字符、变音符号等。

clear;clc;close all;clf;clear all;
graphics_toolkit("gnuplot")

    x = 0:.1:10;
    y1 = exp(-x).*sin(x);
    y2 = exp(x);

h=figure(1);

subplot(2,1,1);
    plot(x,y1)
        h1 = plot(x,y1);
        set(h1,'LineWidth',4)
        set(gca,'FontSize',32)
        set(gca,'FontName','Times')
        set(get(gca,'Ylabel'),'String','TTEST test \rho \rightarrow','FontWeight','Bold','FontSize',32)
        set(get(gca,'Xlabel'),'String','abc / - \rightarrow','FontWeight','Bold','FontSize',32)
        legend({
          'h_{ref}(t)'
          },"location", 'northeast');
          title('TITLE')

        l1 = legend;
        set(l1,'FontName','Times')

  subplot(2,1,2);  
        h2 = plot(x,y2);
        set(h2,'LineWidth',4)
        set(gca,'FontSize',32)
        set(gca,'FontName','Times')
        set(get(gca,'Ylabel'),'String','TTEST test \rho \rightarrow','FontWeight','Bold','FontSize',32)
        set(get(gca,'Xlabel'),'String','agc / -\rightarrow','FontWeight','Bold','FontSize',32)
        legend({
          'h_{ref}(t)'
          },"location", 'northeast');
        l2 = legend;
        set(l2,'FontName','Times')
print ('title_axis.pdf', '-dpdfcairo', '-S1000,600');

标签: plotoctave

解决方案


推荐阅读