1
\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage{physics}
\usepackage[export]{adjustbox}
\usepackage{mathtools}
\usepackage{TikZ}
\usepackage{PGF}
\usepackage{pgfplots}


\begin{document}


\begin{tikzpicture}

\begin{axis}[x post scale=2, hide axis,width=2cm,height=2cm, mark=none ,black] 
\addplot+[domain=-3/2:3/2]({cos(deg(x))}, {x});
\end{axis}


\end{tikzpicture}




\end{document}

regardless of my using the mark=none command I still get plot points when I compile

I.Auguste
  • 125

2 Answers2

1

removing the + between \addplot and [ fixed it

I.Auguste
  • 125
  • 2
    To explain why that worked: The + before the [..] means that the options in the brackets are appended to the default options (from the cycle list that is used). Without the +, the options you specify replace the default options, leaving you with a black line, and whatever other styling you specify. So it's not that removing the + makes the mark=none,black work. It's that by removing it and having a pair of brackets with some options, you've removed all colour and mark settings that the \addplot would otherwise use. – Torbjørn T. Nov 18 '17 at 20:07
  • As mentioned in the link I posted in a comment to your question, you can use \begin{axis}[no markers,...] to remove markers from all plots, or \addplot +[mark=none,...] to remove markers from a specific plot. (... stand for any other options you might use). – Torbjørn T. Nov 18 '17 at 20:10
1

Placing mark=none parameter inside \addplot brackets

\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{graphicx}
\usepackage{physics}
\usepackage[export]{adjustbox}
\usepackage{mathtools}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}

\begin{axis}[x post scale=5, hide axis,width=2cm,height=2cm, black] 
\addplot+[mark=none,domain=-3/2:3/2]({cos(deg(x))}, {x});
\end{axis}

\end{tikzpicture}

\end{document}

Note

It is not necessary to call both pgf and tikz (in lowercases) packages. pgfplots contains them both.

Cragfelt
  • 4,005