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 importing a CSV file and I want to take off the marks of the graphic,how can I do this?

\documentclass{minimal}
\usepackage{pgfplots}
\usepgfplotslibrary{dateplot}

%\usepackage{filecontents}% Commented out dataCL.csv is not overwriten.
\begin{filecontents*}{dataCL.csv}
    x, y
    1, 10
    2, 15
    3, 17
\end{filecontents*}

\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot table [mark = none, draw = none,col sep=comma,x=x, y=y] {dataCL.csv};
\end{axis}
asdfasdfasdfasd
\end{tikzpicture}
\end{document}
share|improve this question
1  
Welcome to TeX.SE. Also, it is better to not use the minimal class, so I'd recommend switching to article: Why should the minimal class be avoided?. Thanks for providing a MWE, but it would be helpful if you also provided some data points as well. –  Peter Grill Apr 12 '13 at 2:40
    
Thanks for the answer... I'm sorry if that's isn't the best way to provide a data file, but anyway here it is. dropbox.com/s/ij82237ae500fiq/dataCL.csv –  Rogério Paludo Apr 12 '13 at 2:46
1  
You should minimze the amount of data to what is required to reproduce the problem. I have updated the MWE. If you prefer to use your data please edit it but only enough points so that the problem is clear. –  Peter Grill Apr 12 '13 at 3:51
add comment

1 Answer

up vote 6 down vote accepted

mark=none is an option to \addplot/\addplot+, not to table. BTW, you should use only marks instead of draw=none. Please find attached an example in which the first plot has only a line and the second one has only marks.

\documentclass{article}
\usepackage{pgfplots}

\usepackage{filecontents}% Commented out dataCL.csv is not overwriten.
\begin{filecontents*}{dataCL.csv}
    x, y
    1, 10
    2, 15
    3, 17
\end{filecontents*}

\begin{document}
\begin{tikzpicture}
\begin{axis}
    \addplot+ [mark=none] table [col sep=comma, x=x, y=y] {dataCL.csv};
    \addplot+ [only marks] table [col sep=comma, x=x, y=y] {dataCL.csv};
\end{axis}
\end{tikzpicture}
\end{document}
share|improve this answer
2  
I'd also omit the x=x and y=y parts, which are redundant –  Joseph Wright Apr 12 '13 at 5:54
    
I should have though of that!! But, if you are updating this, I'd also recommend you use two separate tikzpictures (or a third column in the data) so as to make the graph clear. Took me time to see that this is actually producing the desired output (initially it seems as if it is not). –  Peter Grill Apr 12 '13 at 6:15
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.