1

when i run this code, I get a 10^4 on the bottom right, which seem strictly false. I would like to get rid of this one. And on the top left I have the scaling for the y-axis. I would either like it to be on the left of the axis or get rid of it and write ylabel = {$E[\pi_R]$ in $10^9$},

 \documentclass[letter,11pt,twoside]{article}
    \usepackage{tikz}
    \usepackage{pgfplots}
\usepackage{pgfplotstable}

\begin{document}
\definecolor{light-gray}{gray}{0.5}
\definecolor{dark-gray}{gray}{0.2}
\begin{tikzpicture}[
  labelnode/.style={font=\footnotesize, above},
  labelline/.style={stealth-stealth,shorten >=0.1pt, shorten <=0.5pt}
]
\begin{axis}[
    axis lines = left,
    xlabel = $c_{S_2}$,
    ylabel = {$E[\pi_R]$},
    width=14cm,
    height=8cm,
    xmin=9900, xmax=10100, ymin=6.7*10^9, ymax=8.4*10^9,
xtick={9900,9950,10000,10050,10100},
xticklabels={9900,9950,10000,10050,10100},
]
\addplot [
    domain=9900 : 10000,
    samples=100,
    style=dashed,
    color=dark-gray   ] {24500000000/3 - 5/4 * x* (40000 + 3 * x)} ; %notcare1 check

\coordinate (l) at (rel axis cs:0,1);

\legend{$E[\dot{\pi}_R]$,$E[\tilde{\pi}_R]$}

\end{axis}

\end{tikzpicture}
\end{document}

How can I do this?

1

You only need to add scaled ticks=false.

\documentclass[letter,11pt,twoside]{article}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usepackage{pgfplotstable}

\begin{document}
\definecolor{light-gray}{gray}{0.5}
\definecolor{dark-gray}{gray}{0.2}
\begin{tikzpicture}[
  labelnode/.style={font=\footnotesize, above},
  labelline/.style={stealth-stealth,shorten >=0.1pt, shorten <=0.5pt}
]
\begin{axis}[scaled ticks=false,
    axis lines = left,
    xlabel = $c_{S_2}$,
    ylabel = {$E[\pi_R]$},
    width=14cm,
    height=8cm,
    xmin=9900, xmax=10100, ymin=6.7*10^9, ymax=8.4*10^9,
xtick={9900,9950,10000,10050,10100},
xticklabels={9900,9950,10000,10050,10100},
]
\addplot [
    domain=9900:10000,
    samples=100,
    style=dashed,
    color=dark-gray   ] {24500000000/3 - 5/4 * x* (40000 + 3 * x)} ; %notcare1 check

\coordinate (l) at (rel axis cs:0,1);

\legend{$E[\dot{\pi}_R]$,$E[\tilde{\pi}_R]$}

\end{axis}
\end{tikzpicture}
\end{document}

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.