Practical Guide:
// the important line is this:
frame::current().y1axis()->pos(x1len(0)); // put y axis at 0 position
frame::current().x1axis()->pos(y1len(2)); // put y axis at 0 position
// plot something else
frame::current().draw_frame(false); // do not draw the rectangular frame
set::xrange(-10,10);
set::xtitle("X values");
set::ytitle("Y values");
plot(_1,_1*sin(_1)+2);
The position of an axis can be changed from its default value (either
side of a frame) using the following function:
void axis::pos(const length &);
Note that this function does not expect a numeric value, which would
set the position of the axis along, say, the x1 axis. It expects an
argument of type
length, because
this is more generic: one can for example position the y1 axis to the
0-value on the x1 axis as in the example above.