Force plot to use same axis range [duplicate]

I'd like to place two charts next to each other and have the y-axis scaled the same in both; that is, I'd like the y axis in this example to be from the minimum value, which is 10, to the maximum, 100, in both charts, so they can be more easily compared visually. Or would the best thing to be to put them in the same plot? If so, how can I separate the data visually?

(I got the code for doing the chart from Range chart by value)

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel near ticks,
xtick=data, % Only put labels at positions of data points
xticklabels={A,B,C}, % Provide text for labels
xlabel={Type},
ylabel={Value},
]
only marks, % No lines between the points
mark=empty, % No marks at the points
error bars/y dir=plus,  % Error bars in the positive direction
error bars/y explicit,  % We provide the values for the error bars
error bars/error mark=empty,    % No markers at the end of the error bars
error bars/error bar style={thick}  % Use thick lines for the error bars
] table [
y error expr=\thisrow{Y2} - \thisrow{Y1} % Calculate the length of the error bars
] {
X Y1 Y2
1 10  30
2 20 40
3 30 45
};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
xlabel near ticks,
xtick=data, % Only put labels at positions of data points
xticklabels={D,E,F}, % Provide text for labels
xlabel={Type},
ylabel={Value},
]
only marks, % No lines between the points
mark=empty, % No marks at the points
error bars/y dir=plus,  % Error bars in the positive direction
error bars/y explicit,  % We provide the values for the error bars
error bars/error mark=empty,    % No markers at the end of the error bars
error bars/error bar style={thick}  % Use thick lines for the error bars
] table [
y error expr=\thisrow{Y2} - \thisrow{Y1} % Calculate the length of the error bars
] {
X Y1 Y2
1 60  80
2 70 80
3 90 100
};
\end{axis}
\end{tikzpicture}
\end{document}


marked as duplicate by Torbjørn T. tikz-pgf StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Oct 8 '15 at 20:36

• Just set ymin and ymax for each? (Or use a group plot, which does the same?) – Joseph Wright Jun 11 '15 at 17:31
• @marcellinus12 Note that people are generally not notified of comments unless you write @username, as you see me and Joseph did above. When you start typing the username after the @ you will see it appear in a small box, then you can hit the Tab-key to complete the name. – Torbjørn T. Jun 16 '15 at 21:26