ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Tables and graphs
@ 2000-12-22 17:26 Wouter Verheijen
  2000-12-23  6:52 ` Johannes H?sing
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Wouter Verheijen @ 2000-12-22 17:26 UTC (permalink / raw)


Hi,
I plan to do a essay about physics with Context. The essay will
contain a couple of tables. Most of them will be accompanied by a
graph, displaying the same data, compared with a theoretical curve.

- Which program is best suited for this? My first thought is gnuplot.
  But that will generate (e.g.) .ps-output, thus I cannot edit the
  graph later. Is there a solution?

- Is it possible to share the measured data between the table and the
  graph? Maybe Context can read the table as plaintext and insert the
  \VL, \FR, \MR etc. automatically?

Thanks for your advice!

-- 
Wouter Verheijen 			<wouter.verheijen@worldmail.nl>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tables and graphs
  2000-12-22 17:26 Tables and graphs Wouter Verheijen
@ 2000-12-23  6:52 ` Johannes H?sing
  2000-12-27  8:33   ` Hans Hagen
  2000-12-23 14:02 ` George N. White III
       [not found] ` <Pine.SGI.4.31.0012230948570.141578-100000@wendigo.bio.dfo. ca>
  2 siblings, 1 reply; 6+ messages in thread
From: Johannes H?sing @ 2000-12-23  6:52 UTC (permalink / raw)


On Fri, Dec 22, 2000 at 06:26:09PM +0100, Wouter Verheijen wrote:
> Hi,

Ahoj,

> I plan to do a essay about physics with Context. The essay will
> contain a couple of tables. Most of them will be accompanied by a
> graph, displaying the same data, compared with a theoretical curve.
> 
> - Which program is best suited for this? My first thought is gnuplot.
>   But that will generate (e.g.) .ps-output, thus I cannot edit the
>   graph later. Is there a solution?
> 

The output of gnuplot depends on the argument to 'set terminal'. Type
"help set terminal" at the gnuplot prompt. You can use 'mp' as the
terminal but Metapost at its generic format is limited -- it won't
handle thousands of points in a scatterplot without being enlarged by
a wizard.

> - Is it possible to share the measured data between the table and the
>   graph? Maybe Context can read the table as plaintext and insert the
>   \VL, \FR, \MR etc. automatically?
> 

I'd say you'll have to write a Perl script or whichever scripting
language suits you best and handle the stuff with makefiles if it
becomes hairy.

Groetjes

Johannes
-- 
Johannes Hüsing <hannes@ruhrau.de>   /"\  ASCII-Ribbon Campaign
                                     \ /  against HTML
                                      X   in e-mail and news
                                     / \


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tables and graphs
  2000-12-22 17:26 Tables and graphs Wouter Verheijen
  2000-12-23  6:52 ` Johannes H?sing
@ 2000-12-23 14:02 ` George N. White III
       [not found] ` <Pine.SGI.4.31.0012230948570.141578-100000@wendigo.bio.dfo. ca>
  2 siblings, 0 replies; 6+ messages in thread
From: George N. White III @ 2000-12-23 14:02 UTC (permalink / raw)
  Cc: conTeXt

On Fri, 22 Dec 2000, Wouter Verheijen wrote:

> I plan to do a essay about physics with Context. The essay will
> contain a couple of tables. Most of them will be accompanied by a
> graph, displaying the same data, compared with a theoretical curve.
>
> - Which program is best suited for this? My first thought is gnuplot.
>   But that will generate (e.g.) .ps-output, thus I cannot edit the
>   graph later. Is there a solution?
>
> - Is it possible to share the measured data between the table and the
>   graph? Maybe Context can read the table as plaintext and insert the
>   \VL, \FR, \MR etc. automatically?
>
> Thanks for your advice!

I've done similar projects (although using LaTeX with the publisher's
style file).  Assuming you don't need scatterplots with large numbers of
points, you can use metapost for the plots. You can keep the data in a
convenient format and use a pair of simple programs (awk, perl, etc.) to
format the data for both table and plots.  All this can be managed with
simple makefiles so everything gets updated if you change the data.

If you aren't on unix, you may not have a make utility.  There are
both "free" and commercial versions for Win32, and there have been
several attempts to develop other tools using languages such as perl
and python that are available on most current platforms.  I suppose
there may be ways in texexec to specify some programs that should be
run before the context processing.  If the programs are simple, it
won't hurt to run them even when the output doesn't need updating,
or the programs could contain checks to omit the processing if the
output file exists and is newer than the input file.

-- 
George N. White III <WhiteG@dfo-mpo.gc.ca>  tel: 902.426.8509
  Bedford Institute of Oceanography, Nova Scotia, Canada (TZ=AST4ADT)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tables and graphs
  2000-12-23  6:52 ` Johannes H?sing
@ 2000-12-27  8:33   ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2000-12-27  8:33 UTC (permalink / raw)
  Cc: conTeXt

At 07:52 AM 12/23/00 +0100, Johannes H?sing wrote:
>On Fri, Dec 22, 2000 at 06:26:09PM +0100, Wouter Verheijen wrote:
>> Hi,
>
>Ahoj,
>
>> I plan to do a essay about physics with Context. The essay will
>> contain a couple of tables. Most of them will be accompanied by a
>> graph, displaying the same data, compared with a theoretical curve.
>> 
>> - Which program is best suited for this? My first thought is gnuplot.
>>   But that will generate (e.g.) .ps-output, thus I cannot edit the
>>   graph later. Is there a solution?

Well, it depends on what you want to edit. A few days ago i made some mp
macros that can change colors and line widths and remap colors of a picture
as for instance produced by pstoedit. This is what i will use for cleaning
up graphics and making them more consistent.  

>The output of gnuplot depends on the argument to 'set terminal'. Type
>"help set terminal" at the gnuplot prompt. You can use 'mp' as the
>terminal but Metapost at its generic format is limited -- it won't
>handle thousands of points in a scatterplot without being enlarged by
>a wizard.

A few thousand point is not so much a problem. 

>> - Is it possible to share the measured data between the table and the
>>   graph? Maybe Context can read the table as plaintext and insert the
>>   \VL, \FR, \MR etc. automatically?
>
>I'd say you'll have to write a Perl script or whichever scripting
>language suits you best and handle the stuff with makefiles if it
>becomes hairy.

Indeed a typical perl job. Depending on the data, you can use context using
\doprocessfile cum suis, or even mp to do it for you [using mp directly may
be an option], but perl is more sobust in this respect. 

Hans
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tables and graphs
       [not found] ` <Pine.SGI.4.31.0012230948570.141578-100000@wendigo.bio.dfo. ca>
@ 2000-12-27  8:33   ` Hans Hagen
  2000-12-27 20:20     ` George N. White III
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2000-12-27  8:33 UTC (permalink / raw)
  Cc: Wouter Verheijen, conTeXt

Hi George, 

>there may be ways in texexec to specify some programs that should be
>run before the context processing.  If the programs are simple, it

Texexec has a --convert but currently that is limited to some local xml
filter. We can generalize that but it can be dangerous so we need to
discuss it first. Say that there is 

--convert=myscript

that takes whatever.abc and converts it into whatever.tex, is it accepted
that teh old file is overwritten, or should I save it first and restore it
later? 

Hans 
-------------------------------------------------------------------------
                                                  Hans Hagen | PRAGMA ADE
                      Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tables and graphs
  2000-12-27  8:33   ` Hans Hagen
@ 2000-12-27 20:20     ` George N. White III
  0 siblings, 0 replies; 6+ messages in thread
From: George N. White III @ 2000-12-27 20:20 UTC (permalink / raw)
  Cc: Wouter Verheijen, conTeXt

On Wed, 27 Dec 2000, Hans Hagen wrote:

> Hi George,
>
> >there may be ways in texexec to specify some programs that should be
> >run before the context processing.  If the programs are simple, it
>
> Texexec has a --convert but currently that is limited to some local xml
> filter. We can generalize that but it can be dangerous so we need to
> discuss it first. Say that there is
>
> --convert=myscript
>
> that takes whatever.abc and converts it into whatever.tex, is it accepted
> that teh old file is overwritten, or should I save it first and restore it
> later?

maybe the input format for the problem at hand (a hook to automate
conversion of some external format into .tex that will be included in a
document)  _should_ be xml.

In any case, "whatever.tex" should only be overwritten if "whatever.abc"
is newer.  This way you have the "whatever.tex" in case you need to study
the contents, and if you edit it and save a new version it won't be
overwritten unless there is a good reason (e.g., the input "abc" file is
changed).

-- 
George N. White III <WhiteG@dfo-mpo.gc.ca>  tel: 902.426.8509
  Bedford Institute of Oceanography, Nova Scotia, Canada (TZ=AST4ADT)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-12-27 20:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-22 17:26 Tables and graphs Wouter Verheijen
2000-12-23  6:52 ` Johannes H?sing
2000-12-27  8:33   ` Hans Hagen
2000-12-23 14:02 ` George N. White III
     [not found] ` <Pine.SGI.4.31.0012230948570.141578-100000@wendigo.bio.dfo. ca>
2000-12-27  8:33   ` Hans Hagen
2000-12-27 20:20     ` George N. White III

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).