<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<font face="Helvetica" size="2"> Hi Andy,<br>
<br>
Unfortunately, my knowledge on the code in too poor to fill this task... <br>
However, I still tried to have a look at the code and I have the impression that all happens in line 1077 of make-plots.
<br>
But I have no idea what to change in order to make the coordinate proportional to the canvas...
<br>
<br>
Cheers, Simon.<br>
<br>
<i> def draw(self,coors):<br>
out = ""<br>
out += ('\n%\n% Special\n%\n')<br>
import re<br>
regex = re.compile(r'^(.*?)(\\physics[xy]?coor)\(\s?([0-9\.eE+-]+)\s?,\s?([0-9\.eE+-]+)\s?\)(.*)')<br>
# TODO: More precise number string matching, something like this:
<br>
# num = r"-?[0-9]*(?:\.[0-9]*)(?:[eE][+-]?\d+]"
<br>
# regex = re.compile(r'^(.*?)(\\physics[xy]?coor)\(\s?(' + num + ')\s?,\s?(' + num + ')\s?\)(.*)')
<br>
for i in xrange(len(self.data)):<br>
while regex.search(self.data[i]):<br>
match = regex.search(self.data[i])<br>
xcoor, ycoor = float(match.group(3)), float(match.group(4))<br>
if match.group(2)[1:] in ["physicscoor", "physicsxcoor"]:<br>
xcoor = coors.phys2frameX(xcoor)<br>
if match.group(2)[1:] in ["physicscoor", "physicsycoor"]:<br>
ycoor = coors.phys2frameY(ycoor)<br>
line = "%s(%f, %f)%s" % (match.group(1), xcoor, ycoor, match.group(5))<br>
self.data[i] = line<br>
out += self.data[i]+'\n'<br>
return out</i><br>
</font><br>
<br>
</body>
</html>