* gnuplot module: `option=monochrome` does not work. @ 2011-12-13 17:03 Paul Menzel 2011-12-13 18:23 ` Mojca Miklavec 0 siblings, 1 reply; 3+ messages in thread From: Paul Menzel @ 2011-12-13 17:03 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1.1: Type: text/plain, Size: 700 bytes --] Dear ConTeXt folks, I want to create monochrome plots, but `option=monochrome` is ignored. \usemodule[gnuplot] \setupGNUPLOT[terminal=context,option=monochrome] \startGNUPLOTscript[pi] plot pi t '$π = \ctxlua{context(math.pi)}$' \stopGNUPLOTscript \starttext \useGNUPLOTgraphic[pi] \blank \CONTEXT\ \contextmark\ \contextversion \stoptext Is that the correct way to enable monochrome output? Looking at the Wiki page [1] it should be something like the above. Am I doing something wrong? Thanks, Paul [1] http://wiki.contextgarden.net/Gnuplot [-- Attachment #1.1.2: gnup.pdf --] [-- Type: application/pdf, Size: 15207 bytes --] [-- Attachment #1.1.3: gnup.tex --] [-- Type: text/x-tex, Size: 267 bytes --] \usemodule[gnuplot] \setupGNUPLOT[terminal=context,option=monochrome] \startGNUPLOTscript[pi] plot pi t '$π = \ctxlua{context(math.pi)}$' \stopGNUPLOTscript \starttext \useGNUPLOTgraphic[pi] \blank \CONTEXT\ \contextmark\ \contextversion \stoptext [-- Attachment #1.2: This is a digitally signed message part --] [-- Type: application/pgp-signature, Size: 198 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gnuplot module: `option=monochrome` does not work. 2011-12-13 17:03 gnuplot module: `option=monochrome` does not work Paul Menzel @ 2011-12-13 18:23 ` Mojca Miklavec 2011-12-13 18:32 ` Mojca Miklavec 0 siblings, 1 reply; 3+ messages in thread From: Mojca Miklavec @ 2011-12-13 18:23 UTC (permalink / raw) To: mailing list for ConTeXt users 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 \setupGNUPLOTterminal [context] [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: \startMPextensions 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; \stopMPextensions Mojca ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gnuplot module: `option=monochrome` does not work. 2011-12-13 18:23 ` Mojca Miklavec @ 2011-12-13 18:32 ` Mojca Miklavec 0 siblings, 0 replies; 3+ messages in thread From: Mojca Miklavec @ 2011-12-13 18:32 UTC (permalink / raw) To: mailing list for ConTeXt users Dear Paul, Just a few more thoughts: - If your whole document is black-and-white (if you switch colors off globally), the plot will turn out black-and-white anyway (actually it will be different shades of gray). - You can always use something like plot pi lt 1 lc 0, 2*pi lt 2 lc 0 or lc rgb "black" (if I'm not mistaken about the syntax) or set style line 1 lt 1 lc 0 set style line 2 lt 2 lc 0 plot sin(x) ls 1, cos(x) ls 2, ... Mojca ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-13 18:32 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-12-13 17:03 gnuplot module: `option=monochrome` does not work Paul Menzel 2011-12-13 18:23 ` Mojca Miklavec 2011-12-13 18:32 ` Mojca Miklavec
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).