ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Subject: Re: Venn diagram
Date: Fri, 20 Jan 2006 19:22:36 +0100	[thread overview]
Message-ID: <6faad9f00601201022s7039a64r9eec7bd4da965e4d@mail.gmail.com> (raw)
In-Reply-To: <Pine.WNT.4.63.0601200042300.704@nqvgln>

On 1/20/06, Aditya Mahajan wrote:
> <--- On Jan 19, David Arnold wrote --->
> > I need an easy way of shading these areas:
> >
> > 1. A intersect B
> > 2. A union B
> > 3. A intersect (complement of B)
> > 4. (complement of A) intersect B
>
> There is venn.mp on ctan. Using it you can do basic shading of
> intersection, union etc for 0,1,2 or 3 sets very quickly. Read the
> documentation in source for details. For example

Thanks a lot for the very nice example;

> \startMPinclusions
>    input venn;
>    pair A,B,T[];
>    A = (.4venn_width-.5venn_circle_diameter,.5venn_height);
>    B = (.6venn_width+.5venn_circle_diameter,.5venn_height);
>    T1 = (.5venn_width , 0);
>    T2 = (.5venn_width,.5venn_height-.5venn_circle_diameter);
>    vardef venn_shade = red;

 vardef venn_shade = red enddef;

I tried the (transparent(.8,3,blue)) at that place, but it seems that
either ConTeXt or Acrobat have problems here. It either compiled, but
then Adobe Reader complained, if I tried to compile
    fill fullcircle scaled 3cm withcolor (transparent(.8,3,blue));
manually, then I got an error

**\relax venn-mpgraph.3
 (venn-mpgraph.3
! Undefined control sequence.
\handleMPspecialscommentx #1 ->\doifelse
                                         {#1}{10000}{\settrue \manyMPspecial...
l.15 %%MetaPostSpecials: 2.0 123 1000

?
Missing character: There is no 1 in font nullfont!
...

> Perhaps one can combine the transparent color functionality of
> metapost with venn.mp to get really nice colors for intersections etc.

Hans: please fix the typo on line 488 in mp-spec.mp. I copied the
example from there and wondered why it didn't work (well, it still
doesn't work - the problem described above).


Mojca

  reply	other threads:[~2006-01-20 18:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-20  5:08 David Arnold
2006-01-20  5:49 ` Aditya Mahajan
2006-01-20 18:22   ` Mojca Miklavec [this message]
2006-01-20 20:23     ` Hans Hagen
2006-01-20 23:33       ` Mojca Miklavec

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=6faad9f00601201022s7039a64r9eec7bd4da965e4d@mail.gmail.com \
    --to=mojca.miklavec.lists@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).