Adding error bar on zoomed-in plot with pgfplots

Following example found here, if one try to add error bars, they end up being out of alignment. Any suggestion how to fix it? Workarounds? Adding error bar on zoomed-in plot with pgfplots

\documentclass{article}       \usepackage{pgfplots}    \pgfplotsset{width=10cm,compat=newest} \usepgfplotslibrary{units} \usetikzlibrary{spy,backgrounds} \usepackage{pgfplotstable} \usepackage{siunitx} \pgfplotstableread{ 0.0    1.0 0.0   -0.5 }\datatable \begin{document}  \begin{tikzpicture}[every pin/.style={fill=white}] \begin{axis}[   xlabel={Energy},   ylabel={Intensity},   x unit={eV} ] \addplot +[mark=none] table [x index=0, y index=1] {\datatable}; \addplot +[mark=none] {0.1*x^2};  \coordinate (pt) at (axis cs:0,0); \end{axis}  \node[pin=70:{%     \begin{tikzpicture}[baseline,trim axis left,trim axis right]     \begin{axis}[         tiny,       xlabel={Energy},       ylabel={Intensity},       x unit={eV},       xmin=-1,xmax=1,       ymin=-0.2,ymax=0.2,       enlargelimits,     ]     \addplot +[mark=none] table [x index=0, y index=1] {\datatable};     \addplot +[mark=none,error bars/y dir=both,     error bars/y fixed=0.1] {0.1*x^2};     \end{axis}     \end{tikzpicture}% }] at (pt) {}; \end{tikzpicture}     \end{document} 


Category: pgfplots Time: 2016-07-30 Views: 1
Tags: pgfplots

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.174 (s). 12 q(s)