[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: plot & print
From: |
Ben Abbott |
Subject: |
Re: plot & print |
Date: |
Sat, 14 Nov 2009 13:10:52 -0500 |
On Nov 14, 2009, at 3:52 AM, Alain Content wrote:
> This is most likely a very stupid beginner's question, but still :
>
> I use octave to generate geometrical objects, and need accurate control of
> their size in pixels.
> The way I do that is to plot a figure and then print it.
> For instance, to generate, say, a 500 pixel square :
> plot ([-1,-1,1,1,-1], [-1,1,1,-1,-1]) # a square
> print ("-dpng", "-S500,500", "sq.png") # generate file
>
> However, this method generates margins around the objects, and I can't find
> how to control the size of those margins (or suppress them).
> Alternatively, could one tell me how these margins are sized ?
>
> Thanks in advance,
> Alain
The graphics backend has had a lot of changes recently. If you are running
version 3.2.x then you can have the axis box fill the figure by ...
plot ([-1,-1,1,1,-1], [-1,1,1,-1,-1]) # a square
set (gca, "position", [0 0 1 1])
print ("-dpng", "-S500,500", "sq.png") # generate file
If you are running 3.0.x, I don't know how to do what you want.
Ben
- plot & print, Alain Content, 2009/11/14
- Re: plot & print,
Ben Abbott <=