From: Mikael Sundqvist <mickep@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: [NTG-context] Re: for loop not working in metapost
Date: Fri, 30 Aug 2024 13:34:05 +0200 [thread overview]
Message-ID: <CAHy-LL9UvFgmUqByKL8fgnaN=36ZOFg9br5x7J82jaZ6WE49Wg@mail.gmail.com> (raw)
In-Reply-To: <CALJ_jGRNy2kV6PzyUXprLOdS7NwicwyZTj+8X1sWMoS2s4CACQ@mail.gmail.com>
Hi,
try "dashed evenly" instead of just "dashed".
/Mikael (did not test...)
On Fri, Aug 30, 2024 at 1:24 PM Shiv Shankar Dayal
<shivshankar.dayal@gmail.com> wrote:
>
> Hi,
>
> I have plotted a log function and I want to draw an xy axis grid.
> Below is the code
>
> \starttext
> \startMPcode
> draw function(1,"x", "log(x)", .1, 10, .01) scaled 1cm;
> for i = 0 upto 10:
> draw (i*cm, -5cm) -- (i*cm, 5cm) dashed;
> endfor;
> for i = -5 upto 5:
> draw (0, i*cm) -- (10cm, i*cm) dashed;
> endfor;
> \stopMPcode
> \stoptext
>
> My first for loop draws lines but the second gives me an error. Please help.
> --
> Respect,
> Shiv Shankar Dayal
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
> webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
> archive : https://github.com/contextgarden/context
> wiki : https://wiki.contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2024-08-30 11:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-30 11:19 [NTG-context] " Shiv Shankar Dayal
2024-08-30 11:34 ` Mikael Sundqvist [this message]
2024-08-30 12:02 ` [NTG-context] " Shiv Shankar Dayal
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='CAHy-LL9UvFgmUqByKL8fgnaN=36ZOFg9br5x7J82jaZ6WE49Wg@mail.gmail.com' \
--to=mickep@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).