MWE:
\documentclass{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{groupplots}
\begin{document}
\begin{tikzpicture}
\begin{groupplot}[
group style={
group size=1 by 4,
vertical sep=0.1in,
},
scale only axis,
width=\columnwidth-0.5in-0.09in,
domain=-0.482362:0.035276,
xmin=-0.495, xmax=0.0352762,
]
\nextgroupplot[
height=0.8in,
ymin=-0.9, ymax=4.9,
]
\addplot
gnuplot[id=plot1, raw gnuplot]
{plot '< plotpointreduce -t 0.0175 --max-dist 0.1
--width 2.897 --height 0.8
--xrange \pgfkeysvalueof{/pgfplots/xmin} \pgfkeysvalueof{/pgfplots/xmax}
--yrange \pgfkeysvalueof{/pgfplots/ymin} \pgfkeysvalueof{/pgfplots/ymax}
--x-column delta --y-column v_12 data_fem_0.dat' u 'delta':'v_12'}
;
\end{groupplot}
\end{tikzpicture}
\end{document}
How can I pass the specified values of the axis width(\columnwidth-0.5in-0.09in) and height (0.8in) in the groupplot and \nextgroupplot options to my raw gnuplot string similar to --xrange and --yrange?
The script plotpointreduce expects unitless floats for --width and --height, the ratio is only considered.
Update:
I have changed the call to:
\addplot
gnuplot[id=plot1, raw gnuplot]
{plot '< plotpointreduce -t 0.0175 --max-dist 0.1
--width \pgfkeysvalueof{/pgfplots/width}
--height \pgfkeysvalueof{/pgfplots/height}
--xrange \pgfkeysvalueof{/pgfplots/xmin} \pgfkeysvalueof{/pgfplots/xmax}
--yrange \pgfkeysvalueof{/pgfplots/ymin} \pgfkeysvalueof{/pgfplots/ymax}
--x-column delta --y-column v_12 data_fem_0.dat' u 'delta':'v_12'}
;
However, \pgfkeysvalueof{/pgfplots/width} returns \columnwidth -0.5in-0.09in.
How can I convert this to the actual value in inch?
I have placed the lengthy 'home-baked' script plotpointreduce on https://gist.github.com/Hotschke/afdcd9efabe385c641a6.
Update II
--width \the\pgfkeysvalueof{/pgfplots/width}
\the will expand columnwidth.
My script still complains plotpointreduce: error: argument -w/--width: invalid float value: '345.0pt-0.5in-0.09in'
So I guess my question is simply about expanding this expression. What is the shortest way to do it?
--widthand--heightarguments in? – jens_bo Aug 11 '15 at 08:23\pgfkeysvalueof{/pgfplots/width}because it adds a pt to the end. Right? – jens_bo Aug 12 '15 at 12:18