1

In tkz-fct, the command \tkzDrawX draws the x-axis.

Is there an option to control the size of the ticks on this axis? Is it possible to draw the axis even without ticks at all?

student
  • 29,003

1 Answers1

3

Yes and you have an example in the documentation of tkz-basepage 14enter image description here

An example

\documentclass{scrartcl}
\usepackage{tkz-fct}
\usetkzobj{all}

\tikzset{numline/.style={%
    label={},
    right space=2.5,
    left space=0.5,
    line width=1pt,
    tickup=5pt,
    tickdn=0pt}}

\tikzset{xaxe style/.style={>=stealth',<->}}

\tkzSetUpMark[mark=ball,size=4pt]
\tikzset{mark style/.style={inner sep    = 0pt,
                            mark         = ball,
                            mark size    = 4pt,
                            ball color   = red}} 
\begin{document}

\begin{tikzpicture}
\tkzInit
\tkzDrawX[numline]
\tkzLabelX[step=10]
\tkzHTick{3}
\tkzText[below=3pt,blue](3,0){3}
\tkzHTick{7}
\tkzText[below=3pt,blue](7,0){7}
\end{tikzpicture}

\end{document}

enter image description here

Alain Matthes
  • 95,075
  • 1
    I tried your example in Beamer inside an example block (ie. light green background) and the 0 and 10 labels appear with white background. How I fix that? – Gonzalo May 31 '11 at 17:51
  • 1
    You have several possibilities. In my documentation, I use a macro to set the colors of text and the background : \tkzSetUpColors[background=fondpaille,text=Maroon], this macros is defined in tkz-base. But you can modified \def\tkz@backgroundcolor{white} or you can change a style xlabel styleand finally I think it's possible to change \tkz@fillcolorbut I'm not sure for the last idea – Alain Matthes May 31 '11 at 20:09