[NTG-context] MP figure continuation

Alan Braslau alan.braslau at icloud.com
Sat Jan 7 03:35:06 CET 2023

On Fri, 6 Jan 2023 15:43:07 +0100
Alexandre Christe via ntg-context <ntg-context at ntg.nl> wrote:

> Dear list,
> Is there a way to "continue" an MP figure? Like keeping the axes,
> etc. and just adding code to the figure?
> Maybe I missed something, otherwise I'd find it super useful.
> Thanks in advance and happy new year,
> Alex

Another solution is to save the picture:


draw fullcircle scaled 1cm ;
picture mypicture ; mypicture := currentpicture ;


Then, the next call to \startMPcode (or whatever you use) will have
access to the saved picture.


currentpicture := mypicture ;
draw unitsquare scaled 1cm withcolor red ;


currentpicture is reset for each MP call.

Of course, you must not use
	save mypicture ; picture mypicture ;
because that will make it local.


More information about the ntg-context mailing list