toDocumentSpace

fun toDocumentSpace(p: Vector2): Vector2(source)

Scales and translates the given position from screen space to document space. Can be used to translate mouse events to draw to the plot.