Octave 在保存到文件时无法包含部分绘图

Octave failing to include parts of a plot when saved to file

我有一个非常基本的自定义箱线图函数:

function myboxplot(LPercentile, Median, RPercentile, Height, LineWidth, BoxHeight, MarkerColour, MarkerSize)
  hold on
  plot([LPercentile, RPercentile], [Height, Height], 'linewidth', LineWidth, 'color', 'k', 'linestyle', '-');
  plot([LPercentile, LPercentile], [Height - BoxHeight/2, Height + BoxHeight/2], 'linewidth', LineWidth,  'color', 'k', 'linestyle', '-');
  plot([RPercentile, RPercentile], [Height - BoxHeight/2, Height + BoxHeight/2], 'linewidth', LineWidth,  'color', 'k', 'linestyle', '-');  
  plot(Median, Height, 'marker', 'o', 'markersize', MarkerSize, 'markeredgecolor', 'k', 'markerfacecolor', MarkerColour);    
  hold off
end

当我按预期使用它时,

>> myboxplot(1,2,3,1,3,1,'g',20); hold on
>> myboxplot(2,3,5,3,3,1,'r',20); hold off
>> axis([0,6,0,4]);

它在我的八度音程会话中产生了预期的结果:

但是当我尝试保存到文件时:

>> saveas(gcf,'out.pdf','pdf');

惨败:

无论输出格式如何(至少在 pdf 和 png 之间),都会发生这种情况。
这是一个错误吗?是否有使线条可见的解决方法?
(注意:我也在matlab中尝试过这段代码,并且matlab按预期保存了文件)


(使用: GNU Octave 版本:4.0.3 GNU Octave 许可证:GNU 通用 Public 许可证 操作系统:Linux 3.13.0-37-generic #64-Ubuntu SMP Mon Sep 22 21:28:38 UTC 2014 x86_64 )
更新: windows 上的 Octave 4.0.3 产生了正确的输出,所以这绝对是 "bug" linux。我将在八度音阶跟踪器上提交一个错误,但如果有人在此期间知道任何解决方法,我将不胜感激。

根据 octave bug submission (bug #49225).

,这确实是一个真正的错误,与 octave 用于将 openGL 图形转换为 postscript 的库之一有关,而不是 octave base 本身。

来自现已关闭的错误报告:

"This bug has been fixed in the latest version of gl2ps (1.3.9), but linux mint 17.3 ships with gl2ps 1.3.8. On linux, the workaround is to compile your own version of gl2ps."

我可以确认安装 libgl2ps1 (1.3.9-4) and libgl2ps-dev (1.3.9-4) 并重新编译 Octave 解决了这个错误。