ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Boštjan Vesnicer" <bostjan.vesnicer@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: [MP] labels of points on a circle
Date: Mon, 19 Oct 2009 15:19:16 +0200	[thread overview]
Message-ID: <1ea4ae670910190619j7c29b0b2q1b53e1605ef29fbe@mail.gmail.com> (raw)
In-Reply-To: <84134E24-3D75-4F4B-A6CE-9B07ECD3DC4B@me.com>

Hi Dalyoung,

You can try to adapt the following snippet:

numeric i;
pickup pencircle scaled 4pt;
for i = 1 upto 10:
	z[i] = dir(uniformdeviate 360);
	drawdot z[i] scaled 4cm;
	label(decimal(i), z[i] scaled 4.3cm);
endfor;

Best regards,
Bostjan


On Mon, Oct 19, 2009 at 2:48 PM, dalyoung <haksan@me.com> wrote:
> Hi all,
>
> To draw 9 points with labels, I used the following code.
>
> \startbuffer[point2]
> path p;
> numeric i; i=1;
> for j =0.5,1.3,2.5,3,4,4.8,6,7.2,7.9:
> z[i] = dir(j*45) scaled 4cm;
> i:= i+1;
> endfor;
> p := z1..z2..z3..z4..z5..z6..z7..z8..z9..cycle;
> draw p;
> drawpoints p;
> drawpointlabels p;
> \stopbuffer
> \placefigure[middle][]{}{\processMPbuffer[point2]}
>
> Then it draw everything well except writing labels inside the circle. How
> can I write the labels of the  points outside of the circle?
>
> I'd like to draw 9 points randomly on a circle. Is there a nice way to do
> it?
>
> Thank you.
>
> Best regards,
>
> Dalyoung___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


      reply	other threads:[~2009-10-19 13:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-19 12:48 dalyoung
2009-10-19 13:19 ` Boštjan Vesnicer [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=1ea4ae670910190619j7c29b0b2q1b53e1605ef29fbe@mail.gmail.com \
    --to=bostjan.vesnicer@gmail.com \
    --cc=ntg-context@ntg.nl \
    /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).