On Tue, Dec 13, 2011 at 18:03, Paul Menzel wrote:
> Dear ConTeXt folks,
> I want to create monochrome plots, but `option=monochrome` is ignored.

(Ashamed.) Yes, you are right.

>        \usemodule[gnuplot]
>        \setupGNUPLOT[terminal=context,option=monochrome]

This passes the option to terminal if no better way is available. This
would only help you in case of png, pdf or metapost terminal. For
ConTeXt terminal in input mode it wouldn't help you since the option
color/dashed/etc. are completely ignored. This means that gnuplot will
only consider options fontscale=, points=metapost|tex, width= and
height= since that influences the output. Colors and dashed/solid
lines can be turned on and off on the fly, same for line widths (you
can redraw the same graph with dash turned on and off, using the same
gnuplot output).

First of all, I should fix documentation on that (using it that way is
slightly deprecated and should only be used if the option is not). But
second of all .. I just realized that, for example, standalone mode
writes out

   [linejoin=mitered, % *mitered* | rounded | beveled
    linecap=butt, % *butt* | rounded | squared
    dashed=yes, % *yes* | no
    dashlength=1, % scaling factor for dash lengths
    linewidth=1, % scaling factor for line widths (1.0 means 0.5bp)
    %fontscale=1, % scaling factor for text labels
    points=metapost, % *metapost* | tex (Should points be drawn with
MetaPost or TeX?)
    images=inline] % *inline* | external (inline only works in MKIV,
external requires png support in gnuplot)

but I completely forgot about monochrome option!!! Or rather ... I see
that I print out "\setupcolors[state=start]" if and only if color is
switched on, but that won't really help you in standalone mode. Ouch!
I'm sorry. You don't need to recompile the terminal for that, but I
need to fix t-gnuplot.tex and mp-gnuplot.mp. Does, according to what
you see above, "color=yes|no" make sense? (I will also have to change
the terminal for standalone mode, but that won't affect your plots.)

However, the main reason why I didn't do it better before is because I
have no idea what to do with monochrome. That is: should I use
different shades of gray? Should I simply make all the colors solid
black? And then the user should use "color=no,dashed=yes"? I'm
particularly confused about the choice between different shades of
gray and black.

And yes - I'll fix the wiki page.

Here's a quick workaround:

gp_color_lt[0] := black;
gp_color_lt[1] := black;
gp_color_lt[2] := black;
gp_color_lt[3] := black;
gp_color_lt[4] := black;
gp_color_lt[5] := black;
gp_color_lt[6] := black;
gp_color_lt[7] := black;
gp_color_lt[8] := black;

If your question is of interest to others as well, please add an entry to the 

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net

Reply via email to