将图例/关键点强制设置为特定大小 [英] force graphs legend/key to a specific size

查看:54
本文介绍了将图例/关键点强制设置为特定大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我想包含在某些文档中的数据中生成一些图. 我把盒子放在图形区域之外. 问题在于,对于不同的图,框具有不同的大小,因此图形区域也会更改其大小.由于绘图是垂直对齐的,因此在文档中看起来非常混乱.

i want to generate some plots from my data that i want to include in some documentation. I put the box outside the graph area. the problem is that for different plots the box has different sizes so also the graph area changes its size. this looks very messy in the document becasue the plots are vertical aligned.

我正在寻找一种将框的大小固定为适合所有绘图的宽度的方法,但是我找不到这样做的方法. set key命令具有width参数,但似乎没有做到这一点.

I am searching for a way to fix the size of the box to some width that is appropriate for all plots but i could not found a way to do so. the set key command has a width parameter but it seems not to do that one would expect from such a parameter.

如果有人可以帮助,那会很高兴.

It would be grat if someone could help.

谢谢 vlad

推荐答案

我希望我对您想要的东西有正确的印象.考虑以下示例

I hope I got the correct impression of what you want. Consider the following example

reset

set multiplot layout 2,1

set rmargin screen 0.7
set key reverse Left left top at screen 0.72, graph 1

plot sin(x), cos(x) t 'long title'

plot sin(x), cos(x) t 'very long title'
unset multiplot

哪个给您:

示例和文本都不会移动.您只能设置一个适当的rmargin. lefttop是与at ...指定的位置有关的键箱对齐方式,尽管这些设置是默认设置,但为清楚起见,我明确地将它们包括在内. Left是输入文本的对齐方式.

Both the samples and the text do not move. You must only set an appropriate rmargin. left and top is the key box alignment regarding the position specified with at ..., although these settings are default, I explicitely included them for clarity. Left is the alignment of the entry text.

这篇关于将图例/关键点强制设置为特定大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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