Trying to draw a bar chart either horizontal or vertical using following code
\RequirePackage{fix-cm}
\documentclass[smallextended]{svjour3}
\usepackage{tikz, pgfplots}
\definecolor{Color}{HTML}{2B83BA}
\begin{document}
\begin{figure}
\centering
\begin{tikzpicture}[x={(-.5,0)}]
\foreach \l/\x/\c[count=\y] in {L1-dCache-Read-Miss/0.225701966/Color,
L1-iCache-Read-Miss/-0.066446811/Color,
L3-Cache-Read-Miss/0.036589862/Color,
L3-Cache-Write-Miss/0.010495496/Color}
{\node[left] at (0,\y) {\l};
\fill[\c] (0,\y-.4) rectangle (\x,\y+.4);
\node[right] at (\x, \y) {\x};}
\draw (-.5,0) -- (.5,0);
\foreach \x in {-.1, -.09, -.08, ..., .2}
{\draw (\x,.2) -- (\x,0) node[below] {\x};}
\draw (0,0) -- (0,4.5);
\end{tikzpicture}
\end{figure}
\end{document}
Results are not as expected because of extremely small values. Expected output is as in the attached image
xscaleandyscaleto scale the tikzpicture. Or just usepgfplotsbarplot – nidhin Aug 18 '19 at 05:45! LaTeX Error: File "svjour3.cls" not found.Please make your code compileable. – AndréC Aug 18 '19 at 07:16\documentclass{article}for the example. – Torbjørn T. Aug 18 '19 at 09:12svjourclass, and not any interaction between TikZ andsvjour. It's likely that a solution witharticlewill work just as well withsvjour. As suggested above usingpgfplotsfor this might be a good idea, here is one somewhat similar example: https://tex.stackexchange.com/questions/160819 – Torbjørn T. Aug 18 '19 at 09:54\xis not an abscissa, it's actually an ordinate. And vice versa;\yis actually an abscissa. – AndréC Aug 18 '19 at 14:26