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 the graph below, there are large circular point marks. Is there a way of removing them?

My graph code is

\begin{figure}[H] 
\begin{tikzpicture} 
\begin{axis}[ 
height=9cm, 
width=12cm, 
grid=major, 
xlabel={Levels},
ylabel={Speed},
legend style={
cells={anchor=east},
legend pos=outer north east,
}]

enter image description here

share|improve this question
add comment

migrated from stackoverflow.com Jul 30 '12 at 11:46

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 9 down vote accepted

With pgfplots you can use:

  • mark=none to disable the marks
  • mark=* to specify the marker to use
  • only marks to show only the points

enter image description here

Code:

\documentclass{article}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture} 
\begin{axis}
    \addplot [mark=none,  red,   ultra thick] coordinates { (1,6) (2,8) (3,10)}
    node [midway, sloped, above] {mark=none};

    \addplot [mark=*,     brown, ultra thick] coordinates { (1,4) (2,6) (3,8)} 
    node [midway, sloped, above] {mark=*};

    \addplot [only marks, blue,  ultra thick] coordinates { (1,2) (2,4) (3,6)}
    node [midway, sloped, below] {only marks};
\end{axis} 
\end{tikzpicture}
\end{document}
share|improve this answer
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.