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.

I'm drawing a graph with pgfplot. The values aren't important, I just want to show the shape of the function and so I don't want a border around my graph.

I can't find how to remove/change the color of the border, is this possible?

share|improve this question
add comment

2 Answers 2

up vote 14 down vote accepted

You can use axis lines key either for every axis or specifically for one axis. See the pgfplots manual.

\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.7}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis lines=none]
\addplot[blue,samples=40]{sin(deg(x))};
\end{axis}
\end{tikzpicture}
\end{document}
share|improve this answer
add comment

Try

\begin{axis}[
        hide x axis,
        hide y axis]

As Manuel said in a comment, the following would also work

\begin{axis}[hide axis]
share|improve this answer
    
I think hide axis works, but I'm not sure. –  Manuel Dec 19 '12 at 21:16
    
@Manuel I have just tested and you are right, it does work. Perhaps you should post it as a third answer for the record? I will certainly vote it up! –  Vivi Dec 19 '12 at 22:01
1  
No, it's (almost) exactly the same as yours, you just forget it. Edit your answer. –  Manuel Dec 19 '12 at 22:05
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.