将背景图像添加到Gnuplot [英] Adding a background image to Gnuplot

查看:158
本文介绍了将背景图像添加到Gnuplot的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将jpg图像作为gnuplot输出文件的背景. 目标是要拥有一个外观漂亮的网络气象站.

I want to put a jpg image as background for a gnuplot output file. The goal is to have a nice looking web based weather station.

现在,我正在使用gnuplot png输出和透明背景设置,然后在html代码中设置背景图像.但是结果看起来很时髦.在以下位置查看当前状态:

Right now I'm using gnuplot png output with transparent background setting and then setting a background image in the html code. But the result looks funky around the text. Check out the current state at :

http://drgert.dyndns.ws:8000/bmp085/bmp085.php

所以我当时想在gnuplot本身中设置背景可能会更好.我可以使用矩形对象设置背景以覆盖绘图区域.但是可以在该矩形中使用jpg吗?

So I was thinking it might be better to set the background in gnuplot itself. I can set a background using a rectangle object to cover the plot area. But is it possible to use a jpg in that rectangle?

谢谢, 格特

推荐答案

基本上,您可以向图中添加背景图像,如轴上的Gnuplot图片,但带有filetype=jpg.但这看起来并不像您在链接中显示的那样,而是仅在图形内部.

Basically you could add a background image to the plot like shown in Gnuplot image on axis, but with filetype=jpg. But that wouldn't look like you showed in your link, but would be only inside the graph.

您的实际问题是,使用libgdpng终端在反锯齿字体时似乎在呈现透明性方面存在问题.您可以使用没有问题的pngcairo终端,请参见以下示例:

You actual problem is, that the png terminal, which uses libgd, seems to have problems to render the transparency when anti-aliasing the fonts. You can use the pngcairo terminal, which doesn't have this problem, see the following example:

set terminal pngcairo transparent
set output 'transparent.png'
plot sin(x)
set output

这篇关于将背景图像添加到Gnuplot的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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