ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Alan BRASLAU <alan.braslau@cea.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: tikz and metapost
Date: Sun, 26 Oct 2008 16:24:40 +0100	[thread overview]
Message-ID: <200810261624.40265.alan.braslau@cea.fr> (raw)
In-Reply-To: <6faad9f00810260346o5eb5893w378c2b72639b15b@mail.gmail.com>

Following some exchange off-list (trying to figure out how tikz under context 
got broken), the subject of understanding pgf/tikz with respect to metapost 
came up. I am posting a follow-up here as it may be of interest to others on 
the mailing list, those who know metapost very well as well as those, like 
myself, who are still learning how to use different graphics tools.

On Sunday 26 October 2008 11:46:22 Mojca Miklavec wrote:
> > I am just starting to learn about metapost, and I can't judge yet
> > what pgf/tikz has as advantages and disadvantages.
>
> Advantages of TikZ:
> 1.) many many many many "libraries" that are ready-to-use. Just take a
> glimpse through the manual and it will be evident to you in the first
> glimpse. If you want to draw a graph, you can do it with a few
> commands. (one command draws you axis, one for function, ...)
> You can achieve the same with metapost, but you need to do everything
> from scratch. However, it's really easy to write your own libraries.
> 2.) some special effects like smooth shading works in metapost only
> conditionally (does not work with XeTeX at the moment), and you have a
> wider range with TikZ
>
> Advantages of metapost:
> 1.) rich mathematical machinery (you can write a set of equations and
> metapost will calculate your coordinates)
> 2.) easy to write your own macros

I thought that a major interest of pgf/tikz was the production of portable 
graphics (using many different motors). 

> I use metapost when I need to program something, and TikZ when I need
> to do something fancy very quickly. Another option is export to TikZ
> in Geogebra.



> > As an experiment, I did try comparing making a graph using
> > pgfplot and metagraph, and I did *not* like the result of the second.
>
> metagraph is old as earth.

graph.mp,v 1.2 2004/09/19
Current estimates place the age of the earth at around 4.6 billion years...

> If I draw graphs is meapost, I do that
> manually. Or I use gnuplot module to draw graphs for me, but graph
> drawing is much easier & more flexible with TikZ if you have
> datapoints ready. 

I myself find gnuplot to be fatally flawed and have never liked using it.

(I still sometimes produce graphics using an old program written in K&R C that 
generates HPGL for pen plotters, with a filter that then creates postscript.
Now THAT is almost stone age! But this program can also handle an arbitrary 
number of points VERY efficiently, only limited by the size of your storage 
device.)

> If you need some complex curve, TikZ is improving in
> that area, but in metapost it's out-of-the-box to draw it.

Why did Till Tantau write pgf/tikz? Clearly he knew metapost, so another route 
could have been to develop a standard library of metapost macros. I'm asking 
these questions here as there seems to be a preference (or prejudice) towards 
metapost amongst the context community. Indeed, it appears pretty powerful.  
But as Mojca wrote about glimpsing at the pgf/tikz manual, it too is very rich 
and I have yet to learn about all of the new features that were introduced in 
pgf-2.0.

Thus, I am trying to figure out where to invest my learning efforts. Do any 
other metapost and/or pgf-tikz experts have something to contribute to this 
query?

-- 
Alan Braslau
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  parent reply	other threads:[~2008-10-26 15:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-23 15:40 Textbackground with leftframe holzminister
2008-10-24 21:17 ` mkiv, luatex and tikz Alan BRASLAU
2008-10-24 22:33   ` luigi scarso
2008-10-25  7:18     ` luigi scarso
2008-10-26 13:48   ` Mojca Miklavec
2008-10-26 22:45   ` Mojca Miklavec
     [not found] ` <200810261045.19152.alan.braslau@cea.fr>
     [not found]   ` <6faad9f00810260346o5eb5893w378c2b72639b15b@mail.gmail.com>
2008-10-26 15:24     ` Alan BRASLAU [this message]
2008-10-26 16:15       ` tikz and metapost Jean Magnan de Bornier
2008-10-28  9:01       ` 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=200810261624.40265.alan.braslau@cea.fr \
    --to=alan.braslau@cea.fr \
    --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).