Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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

share|improve this answer
    
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
    
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 style and 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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.