ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan Braslau via ntg-context <ntg-context@ntg.nl>
To: Alexandre Christe via ntg-context <ntg-context@ntg.nl>
Cc: Alan Braslau <alan.braslau@icloud.com>
Subject: Re: MP figure continuation
Date: Fri, 6 Jan 2023 19:35:06 -0700	[thread overview]
Message-ID: <20230106193506.48e1a647@boo.my.domain> (raw)
In-Reply-To: <CALC5-UJgsR+APNb-=yb2oi-dPFcztpdK4w1wwG5mnXHZRZkPwQ@mail.gmail.com>

On Fri, 6 Jan 2023 15:43:07 +0100
Alexandre Christe via ntg-context <ntg-context@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:

\startMPcode

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

\stopMPcode

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

\startMPcode

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

\stopMPcode

currentpicture is reset for each MP call.

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

Alan
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

      parent reply	other threads:[~2023-01-07  2:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-06 14:43 Alexandre Christe via ntg-context
2023-01-06 14:53 ` Mikael Sundqvist via ntg-context
2023-01-06 14:58 ` Gavin via ntg-context
2023-01-06 15:02   ` Alexandre Christe via ntg-context
2023-01-07  2:35 ` Alan Braslau via ntg-context [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230106193506.48e1a647@boo.my.domain \
    --to=ntg-context@ntg.nl \
    --cc=alan.braslau@icloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).