2

以下を使用して、R で空のプロットを作成できます。

plot.new()

これにより、デフォルトの幅と高さで空白のプロットが作成されます。

高さを最小限に抑えた空のプロットを作成したいと考えています。私は試しpng('z.png', height=1)ましたが、それは私を手に入れました:

> png('x.png', height=1)
> plot.new()
Error in plot.new() : figure margins too large

どうすればそのようなプロットを作成できますか? マージンもゼロにする必要があると思います。

4

1 に答える 1

3

ええと...なぜあなたがこれをしたいのかわかりませんが、ここに行きます:

# Make a png file
png('x.png', height=1)

# Change the margins of the plot to 0 on each side
par(mar=rep(0,4))

# Make an empty plot
plot.new()

# Close the connection to the png file
dev.off()
于 2013-08-23T17:37:33.217 に答える