4

我正在尝试在图表中绘制一些数据。我对图表完全陌生,但我本质上想要一个矩形,当我将其他图表放在它上面时它会增长。我已经搜索了文档,但没有找到任何东西。

是否存在这样的形状,或者知道缩放多少的方法?

4

1 回答 1

4

如果您只需要一个围绕一些图表的矩形,boundingRect可能就足够了。它可能看起来像这样(注意pad完全是可选的):

-- Arbitrary example, taken from the manual.
contents :: Diagram B
contents = c ||| hrule 1 ||| c
    where
    c = circle 1 <> vrule 2

-- Adding a bounding rectangle around it, with a little padding.
example :: Diagram B
example = contents <> bounds
    where
    bounds = boundingRect (contents # pad 1.1)
        # lc red
于 2020-02-28T23:32:05.377 回答