phyphox_coordinates.py 608 B

123456789101112131415
  1. from pyx import bitmap, canvas, color, deco, path, text, unit
  2. axiscolor = color.rgb(0.7, 0, 0)
  3. i = bitmap.jpegimage("phyphox_measurement.jpg")
  4. unit.set(vscale=10, wscale=10, xscale=10)
  5. c = canvas.canvas()
  6. c.insert(bitmap.bitmap(0, 0, i, compressmode=None))
  7. c.stroke(path.line(40, 26, 40, 45), [axiscolor, deco.earrow])
  8. c.text(41, 45, '$z$', [text.valign.top, axiscolor])
  9. c.stroke(path.line(40, 26, 46, 10), [axiscolor, deco.earrow])
  10. c.text(46.8, 10.5, '$x$', [axiscolor])
  11. c.stroke(path.line(40, 26, 66, 32), [axiscolor, deco.earrow])
  12. c.text(66, 33.5, '$y$', [text.halign.right, axiscolor])
  13. c.writePDFfile()