Example of subplot, inplot, rotate, aspect, shear.
MGL code:
subplot 2 2 0:box:text -1 1.1 'Just box' ':L' inplot 0.2 0.5 0.7 1 off:box:text 0 1.2 'InPlot example' subplot 2 2 1:title 'Rotate only':rotate 50 60:box subplot 2 2 2:title 'Rotate and Aspect':rotate 50 60:aspect 1 1 2:box subplot 2 2 3:title 'Shear':box 'c':shear 0.2 0.1:box
C++ code:
void smgl_aspect(mglGraph *gr) // transformation { gr->SubPlot(2,2,0); gr->Box(); gr->Puts(mglPoint(-1,1.1),"Just box",":L"); gr->InPlot(0.2,0.5,0.7,1,false); gr->Box(); gr->Puts(mglPoint(0,1.2),"InPlot example"); gr->SubPlot(2,2,1); gr->Title("Rotate only"); gr->Rotate(50,60); gr->Box(); gr->SubPlot(2,2,2); gr->Title("Rotate and Aspect"); gr->Rotate(50,60); gr->Aspect(1,1,2); gr->Box(); gr->SubPlot(2,2,3); gr->Title("Shear"); gr->Box("c"); gr->Shear(0.2,0.1); gr->Box(); }