# psgraph with y-axis on left and right of graph and axis labels

I'm attempting to plot two quantities on one graph each with their own vertical axis. I've got as far as the MWE below but am stuck on two problems.

1. Can I make the right hand axis have the same line style as the left axis (I can probably fudge it with \psline but I'd like to know if there is a 'proper' way)

2. Can I make the right hand vertical axis have an axis label like the left but with "Current [A]" (without quotes) centred on the vertical position of the axis and 0.3in to the right of the axis line.

The data files are available from capv.txt, and capi.txt.

The output from the code below look like

I have not provided 'real' data. When looking at the data given, one might wonder why I want two vertical axes. The two data sets I'm intending to plot have widely differing peak magnitudes and different units, but are related in time (x axis) so I find plotting them in this way desirable.

\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\begin{document}

\begin{pspicture}(1,1)

\psset{llx=-1cm,lly=-1cm}

\psset{xAxisLabel={Time [ms]}, xAxisLabelPos={c,-0.3in}, yAxisLabel={Voltage [V]}, yAxisLabelPos={-0.3in,c}}

\begin{psgraph}[axesstyle=axes,xticksize=0 6,yticksize=0 20,subticks=0,ylabelFactor=,Dx=5,dy=1,Dy=1,Oy=-3](0,-3)(20,3){6cm}{3cm}

\pstScalePoints(1e4,1e0){}{}
\listplot[linecolor=blue,linewidth=1pt,showpoints=false]{\voltage}

\psaxes[axesstyle=axes,yticksize=0 20,ylabelFactor=,dy=1\psyunit,Dy=1,ylabelPos=right, xAxis=false, yAxis=true, Oy=-3](0,-3)(20,3)

\pstScalePoints(1e4,1e0){}{}
\listplot[linecolor=red,linewidth=1pt,showpoints=false]{\current}
\end{psgraph}
\end{pspicture}
\end{document}

-

I do not really understand what you mean with linestyle. However here is a solution for a better label setting on the right:

\documentclass[a4paper,10pt]{article}
\begin{document}

\begin{pspicture}(1,1)
\psset{llx=-1cm,lly=-1cm}
\psset{xAxisLabel={Time [ms]}, xAxisLabelPos={c,-0.3in}, yAxisLabel={Voltage [V]}, yAxisLabelPos={-0.3in,c}}

\begin{psgraph}[axesstyle=axes,xticksize=0 6,yticksize=0 20,
subticks=0,Dx=5,Oy=-3](0,-3)(20,3){6cm}{3cm}
\pstScalePoints(1e4,1e0){}{}
\listplot[linecolor=blue,linewidth=1pt]{\voltage}
\multido{\iA=-3+1}{7}{\rput[r](21.75,\iA){$\iA$}}
\rput{90}(23,0){Current[A]}
\pstScalePoints(1e4,1e0){}{}
\listplot[linecolor=red,linewidth=1pt,xStart=1.e-8]{\current}
\end{psgraph}
\end{pspicture}
\end{document}


-