# How do you plot a function without a y-axis?

I'm looking to design a question where students sketch a derivative based on a drawn function without the y-axis.

The y-axis is not important as we're focusing on the x-values of turning points and inflection points (in fact I don't need it at all).

I haven't managed to find a way to graph a function with only the x-axis (without the ticks or numbers is even better) with tikz or pgfplots.

Does anyone know how to do this?

• Welcome to TeX.SE. It would be helpful if you composed a fully compilable MWE including \documentclass and the appropriate packages that sets up the problem. While solving problems can be fun, setting them up is not. Then, those trying to help can simply cut and paste your MWE and get started on solving the problem. – Peter Grill Feb 28 '16 at 2:24

What you're looking for is axis y line=none:

\documentclass[tikz]{standalone}

\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.13}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis x line=middle,
axis y line=none,
domain=-360:360,
xtick={-360, -330, ..., 360},
samples=1001,
xticklabels=\empty,
]