groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Groff] gpic question?


From: Ted Harding
Subject: RE: [Groff] gpic question?
Date: Tue, 01 Feb 2005 21:05:35 -0000 (GMT)

On 01-Feb-05 John Doe wrote:
> Is it worthwhile to learn gpic or not? I used to use
> xfig on linux for most of my drawings, now I am on
> winblowz and I don't know. There's winfig, of course,
> but I don't like it as much as xfig. To rephrase my
> question: What is the equivalent of vim for drawing
> figures? :)

Well, putting that way, gpic!

The "primitives" provided by gpic are similar to those
of xfig (though perhaps more primitive!).

The main difference would be that in gpic you have to
type in a text description of what you want, and you
will need to supply explicit numerical coordinates and
dimensions for your objects, though there are short-cut
implicit descriptions in some contexts, e.g.

  line from 2nd last box .nw to last box .se

draws a line from the top left-hand corner ("northwest")
of the last box but one which you drew to the bottom
right-hand corner ("southeast") of the last box you drew.

To rephrase this: You do not have the facility you have
in xfig to place, move, resize, etc. using the mouse. You
have to (literally) spell it out. This can sometimes involve
extended trial-and-error before you are pleased with the
result.

One feature of gpic which, I think, is not implemented
in xfig is the macro facility which allows you to define
a possibly complicated type of entity in terms of parameters,
and use this to draw explicit entities by reading in data
for the instances from a file (or in-line). In particular
this makes it very easy to draw graphs (e.g. scatter-plots)
of data, and curves which are the graphs of mathematical
functions, etc.; I think this might be very difficult in
xfig (though I'm no expert on xfig).

Overall, I find that gpic is very powerful and flexible,
though it takes a while to learn how to use it well.
Once you get the hang of it, you should be able to produce
very professional-looking drawings quite quickly.

The best advice would be to try it out, and then ask
us questions about how to do anything you haven't sussed
out yet.

It's a pity you are having to so this in Windows: displaying
your current draft on screen, without quitting the editor, is
easier in Linux!

Attached (as "vernier.tr"; I hope the attachment makes it to
the list, but I'm copying this to you privately as well) is a
short text in troff which comes out as an explanation of the
principle of the "Vernier caliper" measuring instrument which
I once wrote for someone. In the middle is a fairly short piece
of pic code which draws the diagram. This illustrates some of
the capabilities of gpic, and is the sort of diagram where gpic
really comes into its own, since there are some elements of the
diagram which have to be placed very precisely indeed (or the
effect would be spoiled).

Since this file also uses eqn to set some equations, and the ms
macros, convert it to PS with

  groff -pe -ms vernier.tr > vernier.ps

and then view the PS file.

Cheers,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861  [NB: New number!]
Date: 01-Feb-05                                       Time: 21:05:35
------------------------------ XFMail ------------------------------

Attachment: vernier.tr
Description: vernier.tr


reply via email to

[Prev in Thread] Current Thread [Next in Thread]