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 wanted to divide the y coordinate values by 1050 so i used scaled y ticks=real:1050

Here is my code

\begin{figure}[H]
\begin{tikzpicture}
\begin{axis}[
scaled y ticks=real:1050,
height=9cm,
width=15cm,
grid=major,
xlabel={Levels},
ylabel={Accu},
legend style={
cells={anchor=east},
legend pos=outer north east,
}
]

I need to remove the .1,050 label from the graph. Does anyone know how to remove it ?

enter image description here after doing ytick scale label code/.code={}, that label went away, but now iam left with a new problem on a another graph of mine. The y axis goes beyond the 1 value. I only need the graph to show upto y value of 1. As shown here the graph goes upto 1.07

enter image description here

share|improve this question
add comment

1 Answer

up vote 9 down vote accepted

You can use ytick scale label code/.code={}:

\documentclass{article}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}
\begin{axis}[
scaled y ticks=real:1050,
ytick scale label code/.code={},
height=9cm,
width=15cm,
grid=major,
xlabel={Levels},
ylabel={Accu},
legend style={
cells={anchor=east},
legend pos=outer north east,
}
]

\end{axis}
\end{tikzpicture}

\end{document}

enter image description here

Adding the option ymax=<value>, for the appropriate <value>, will solve the problem mentioned in the edit to the original question.

share|improve this answer
    
Iam now left with a new problem. I updated my question. My graph displays beyond y = 1 –  user581544 Jul 31 '12 at 4:37
1  
@user581544 adding the option ymax=1 should do the job. –  Gonzalo Medina Jul 31 '12 at 4:40
    
actually ymax=1050 worked –  user581544 Jul 31 '12 at 4:41
    
@user581544 Ah, of course, I forgot the multiplicative factor. –  Gonzalo Medina Jul 31 '12 at 4:42
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.