以透明背景在 Octave 中保存绘图 [英] Saving a plot in Octave with a transparent background

查看:79
本文介绍了以透明背景在 Octave 中保存绘图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Octave 绘制了一些 GPS 轨迹和航向矢量.

I've plotted some GPS tracks and heading vectors using Octave.

我想将绘图叠加在卫星图像上,但是当我保存绘图时,它具有白色背景.有没有办法用透明背景保存?

I'd like to overlay the plot on a satellite image, but when I save the plot it has a white background. Is there a way to save it with a transparent background?

推荐答案

我认为将打印与pngalpha"设备一起使用可以满足您的需求,例如:

I think using print with the "pngalpha" device does what you want, e.g.:

print(gcf,'-dpngalpha', 'myplot.png');

不幸的是,这没有很好的记录.我广泛浏览了源代码以找到一种方法来破解/修补八度音程来做到这一点,结果发现这已经是可能的了.

This is poorly documented unfortunately. I browsed the source code extensively to find a way to hack/patch octave to do this, only to find out this was already possible.

这篇关于以透明背景在 Octave 中保存绘图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆