1

I have the following code for a plot. I need to place numbers of x-axis and y-axis in above and the right side of the plot frame respectively. The code is

\documentclass{standalone}
\usepackage{tikz,pgfplots,graphicx}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
height=9cm,
width=9cm,
grid=major,
]

\addplot {-x^5 - 242};
\addlegendentry{model}

\addplot coordinates {
    (-4.77778,2027.60977)
    (-3.55556,347.84069)
    (-2.33333,22.58953)
    (-1.11111,-493.50066)
    (0.11111,46.66082)
    (1.33333,-205.56286)
    (2.55556,-341.40638)
    (3.77778,-1169.24780)
    (5.00000,-3269.56775)
};
\addlegendentry{estimate}
\end{axis}
\end{tikzpicture}
\end{document}

This code results

But I want to have the plot as

How can I do that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.