From: Fabrice Couvreur <fabrice1.couvreur@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Strange behavior with TikZ
Date: Thu, 5 Oct 2017 19:26:25 +0200 [thread overview]
Message-ID: <CACyK-epSHGwbxXhvRB+PZnQDKfKrDXcX47=jwPsLC4H5-gaWPA@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 2442 bytes --]
Hello,
If I put any image, there is no problem : the title of the section is in
color and the text in black.
With a graphic made with TikZ, the title and the text are in color.
Thank you for your help.
Fabrice
\usemodule[tikz]
\usemodule [graph]
\usemodule[pgfplots]
\pgfplotsset{compat=newest}
\definecolor[Mycolor][c=.6,m=0.8,y=0,k=0]
\unexpanded\def\interff#1#2{\math{\left[#1\,;#2\right]}}
\setuphead
[section]
[textcommand=,
color=magenta,
style=]
\starttext
\startsection[title={Résoudre graphiquement une équation
\math{f(x)=g(x)}},sectionsegments=section,color=magenta]
\placefigure[none,right]{}{
\hbox{\switchtobodyfont[8pt]
\starttikzpicture[/pgf/declare function={f(\x)=\x^2-3;},/pgf/declare
function={g(\x)=-\x^2+2*\x+1;}]
\startaxis[
restrict x to domain=-3:3, xmax=3, xmin=-3,
restrict y to domain=-5:4, ymax=4, ymin=-5,
x=1cm,
y=0.5cm,
axis x line = middle,
axis y line = middle,
axis line style = thick,
major grid style=Mycolor,
minor grid style=Mycolor,
grid=both,
xtick={-2,...,2},
ytick={-4,...,3},
extra x ticks={-3,3},
extra x tick label={\null},
extra y ticks={-5,4},
extra y tick label={\null},
extra tick style={tick style={draw=none}},
every tick/.style={
black,
thick,
},
y tick label style={
/pgf/number format/1000 sep={}
},
xlabel=$x$,ylabel=$y$,
every axis x label/.style={
at={(ticklabel* cs:1.01)},
anchor=west,
},
every axis y label/.style={
at={(ticklabel* cs:1.01)},
anchor=south,
},
samples=2000,
>=stealth,
]
\addplot[only marks,mark=x,color=black,mark options={scale=1.5},
thick] table[x=Nombre,y=Valeur]{
Nombre Valeur
-1 -2
2 1
} ;
\addplot [smooth,domain=-1.5:2.5, thick,magenta] {f(x)} ;
\addplot [smooth,domain=-1.5:2.5, thick,green] {g(x)} ;
\node[above left,green] at (2,2) {\math{{\cal C}_g}} ;
\node[below right,magenta] at (1.5,-1) {\math{{\cal C}_f}} ;
\node[below left ] at (-0.1,-0.1) {\math{0}} ;
\node[fill=black,circle,scale=0.4,magenta] at (-1.5,{f(-1.5)}){} ;
\node[fill=black,circle,scale=0.4,magenta] at (2.5,{f(2.5)}){} ;
\node[fill=black,circle,scale=0.4,green] at (-1.5,{g(-1.5)}){} ;
\node[fill=black,circle,scale=0.4,green] at (2.5,{g(2.5)}){} ;
\stopaxis
\stoptikzpicture}}
\input knuth
\stopsection
\stoptext
[-- Attachment #1.2: Type: text/html, Size: 3057 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2017-10-05 17:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-05 17:26 Fabrice Couvreur [this message]
2017-10-05 20:35 ` Hans Hagen
2017-10-05 20:51 ` Fabrice Couvreur
2017-10-07 10:17 ` Fabrice Couvreur
2017-10-07 12:40 ` Aditya Mahajan
2017-10-07 12:44 ` Aditya Mahajan
2017-10-07 13:59 ` Hans Hagen
2017-10-07 21:48 ` Fabrice Couvreur
2017-10-10 7:03 ` luigi scarso
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='CACyK-epSHGwbxXhvRB+PZnQDKfKrDXcX47=jwPsLC4H5-gaWPA@mail.gmail.com' \
--to=fabrice1.couvreur@gmail.com \
--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).