密钥在pm3d gnuplot中变得不可见 [英] Key becomes invisible in pm3d gnuplot

查看:56
本文介绍了密钥在pm3d gnuplot中变得不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用以下代码使用pm3d映射在gnuplot中绘制图形:

I am using following code to draw a graph in gnuplot using pm3d map:

set pm3d map
set pm3d corners2color c1
spl 'patternD0pt02.dat' title "(a)"

但是,在生成图时,原本应该出现在右上角的标题(a)"变得不可见(或隐藏在图的后面).有什么办法可以使此键/标题可见?

But when the plot is generated, the title "(a)", which otherwise should have appeared in the top right corner, becomes invisible (or hides behind the plot). Is there any way to make this key/title visible?

预先感谢

推荐答案

实际上,标题隐藏在表面后面,没有选项set key front.这是4.6中的错误.并已在5.0中修复.

Indeed, the title is hidden behind the surface and there is no option set key front. This is a bug in 4.6. and is fixed in 5.0.

您可以通过放置一个普通标签来解决,因为pm3d图的标题不会绘制示例项.在标签后面放一个白色矩形有点棘手:

You can workaround by placing a normal label, since the title of a pm3d plot doesn't plot a sample item. Putting a white rectangle behind the lable is a bit tricky:

set label center at graph 0.95,0.95 front '(a)'
set object rectangle front at graph 0.95,0.95 size char 5,2 fc rgb 'white' fillstyle solid noborder

一个完整的,有效的示例是:

A full, working example is:

set terminal pngcairo size 800,600
set output 'foobar.png'

set xrange [0:10]
set yrange [0:10]
set samples 20
set isosamples 20

set pm3d map

set label center at graph 0.95,0.95 front '(a)'
set object rectangle front at graph 0.95,0.95 size char 5,2 fc rgb 'white' fillstyle solid noborder
splot '++' using 1:2:1

4.6.4的结果是:

The result with 4.6.4 is:

这篇关于密钥在pm3d gnuplot中变得不可见的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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