<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title></title>
<style type="text/css">
<!--
body{margin-left:10px;margin-right:10px;margin-top:10px;margin-bottom:10px;}
-->
</style>
</head>
<body marginleft="10" marginright="10" margintop="10" marginbottom="10">
<div align="left" style="text-align:left;"><font face="Arial" size="+0" color="#000000" style="font-family:Arial;font-size:10pt;color:#000000;">Compiling the example below with xetex everything is perfect but compiling with latex and pdflatex I get a ghostscript error message:</font></div>
<div align="left" style="text-align:left;"><font face="Times New Roman" size="+0" color="#000000" style="font-family:Times New Roman;font-size:12pt;color:#000000;">MiKTeX GPL Ghostscript 9.19: Unrecoverable error, exit code 1</font></div>
<br />
<br />
<div align="left" style="text-align:left;"><font face="Arial" size="+0" color="#000000" style="font-family:Arial;font-size:10pt;color:#000000;">Poul Riis</font></div>
<br />
<div align="left" style="text-align:left;"><font face="Arial" size="+0" color="#000000" style="font-family:Arial;font-size:10pt;color:#000000;"><b>Graphics with PSTricks <<a href="mailto:pstricks@tug.org">pstricks@tug.org</a>> writes:</b></font></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">The coordinates are saved in the PS array Points and can be</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">used later if you put the array Points into the global dict</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">and the number of points is n.</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">The points are saved in the wrong order!</font></span></div>
<br />
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\getCoor{8} will get the pair of x,y, counted from 1</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">It can easily be extended to \getxCoor . In the below example I marked</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">three points by a cross</font></span></div>
<br />
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">Herbert</font></span></div>
<br />
<br />
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\documentclass{article}</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\usepackage[dvips,x11names]{pstricks}</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\usepackage{pst-plot}</font></span></div>
<br />
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\makeatletter</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\def\psbar@ii{\addto@pscode{startGlobal false \tx@NArray endGlobal</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\psbar@iii}}</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\def\psbar@iii{%</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">    newpath</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">    n 1 sub {</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">      /Yval exch def /Xval exch def</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">      2 copy /YNext exch def Xval sub /DX exch def</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">      Xval 0 moveto % Start Point</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">      0 YNext rlineto % relative move</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">      DX 0 rlineto</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">      0 YNext neg rlineto</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">      DX neg 0 rlineto</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">    } repeat</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">}%</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\let\UserCoor\tx@UserCoor</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\makeatother</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\def\getCoor#1{Points n #1 sub 2 mul get Points n #1 sub 2 mul 1 add get</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\UserCoor}</font></span></div>
<br />
<br />
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\thispagestyle{empty}</font></span></div>
<br />
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\begin{document}</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\readdata{\data}{../Downloads/simon.dat}</font></span></div>
<br />
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\psset{xAxisLabel=Time (minutes),</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">        yAxisLabel=Load  (W),xAxisLabelPos={c,-10},yAxisLabelPos={-5,c}}%</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\begin{psgraph}[axesstyle=frame,xticksize=0 110,yticksize=0</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">100,Dx=10,Dy=10,xsubticks=5,subticksize=1](0,0)(100,110){15cm}{11cm}</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\listplot[linecolor=Red1,fillcolor=Cornsilk1,fillstyle=solid,</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">          linewidth=0.1pt,plotstyle=bar,barwidth=0.4]{\data}</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\listplot[linecolor=Blue1, linewidth=2pt]{\data}</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\psline[arrows=->](0,0)(100,0)</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\psline[arrows=->](0,0)(0,110)</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">%</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\multido{\iA=0+2}{35}{\psdot(!Points \iA\space 2 getinterval aload pop</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\UserCoor)}</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\psdot[linecolor=red,dotstyle=x,dotscale=3](! \getCoor{3} )</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\psdot[linecolor=red,dotstyle=x,dotscale=3](! \getCoor{13} )</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\psdot[linecolor=red,dotstyle=x,dotscale=3](! \getCoor{30} )</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\end{psgraph}</font></span></div>
<div align="left" style="text-align:left;"><span style="background-color:#d0d0d0;"><font face="Geneva" size="+0" color="#000000" style="font-family:Geneva;font-size:10pt;color:#000000;">\end{document}</font></span></div>
<br />
</body>
</html>