Screen coordinates in R

January

I would like to draw two perpendicular lines on the current device. They should both have the same apparent length on the device, irrespective of aspect ratio of the output and the device size.

Is this at all doable? In principle this is the problem of drawing a perfect circle on the screen.

Carl Witthoft

You could retrieve the current graphics window coordinates. Thanks to Josh O'Brian for providing me with this code a while back. First you create a window (or plot something), then run this line:

 myasp <- with(par(),(pin[2]/pin[1])/(diff(usr[3:4])/diff(usr[1:2])))

Then use that aspect information to adjust the lengths of the lines you're going to plot.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Transformation the screen coordinates to stage coordinates

From Dev

QML Screen Coordinates of Component

From Dev

Display touch coordinates on screen

From Dev

Mapping coordinates to screen in PyGame

From Dev

How to convert workspace coordinates to screen coordinates?

From Dev

How to convert screen coordinates to control coordinates

From Dev

screen coordinates to sharpdx device context coordinates

From Dev

How to convert workspace coordinates to screen coordinates?

From Dev

How to get object coordinates from screen coordinates?

From Dev

Are the coordinates in WINDOWPOS on WM_WINDOWPOSCHANGED in parent coordinates or screen coordinates?

From Dev

How to calculate transformation from screen coordinates to isometric screen coordinates?

From Dev

Points coordinates in multiple screen CoronaSDK

From Dev

gl_PointSize to screen coordinates

From Dev

GetWindowRect coordinates not screen-relative

From Dev

Get the center coordinates of phone screen

From Dev

Get Screen-Coordinates of a QuickControl

From Dev

Get the center coordinates of phone screen

From Dev

Get coordinates (screen) of GridLayout items

From Dev

How to project Webcam captured frame coordinates to screen coordinates

From Dev

Mac OS X: Convert between NSView coordinates and global screen coordinates

From Dev

Game Dev - Working with Screen Coordinates vs World Coordinates

From Dev

How to get world coordinates from screen coordinates in Vispy

From Dev

How to convert screen coordinates to coordinates on a z transformed element?

From Dev

Translate Firebase MLKit Bounding box coordinates to screen view coordinates

From Dev

Mac OS X: Convert between NSView coordinates and global screen coordinates

From Dev

The coordinates of the plot in R

From Dev

Latitude and Longitude coordinates in R

From Dev

Math behind finding screen coordinates in a path tracer

From Dev

OSX - make cursor click at particular screen coordinates

Related Related

  1. 1

    Transformation the screen coordinates to stage coordinates

  2. 2

    QML Screen Coordinates of Component

  3. 3

    Display touch coordinates on screen

  4. 4

    Mapping coordinates to screen in PyGame

  5. 5

    How to convert workspace coordinates to screen coordinates?

  6. 6

    How to convert screen coordinates to control coordinates

  7. 7

    screen coordinates to sharpdx device context coordinates

  8. 8

    How to convert workspace coordinates to screen coordinates?

  9. 9

    How to get object coordinates from screen coordinates?

  10. 10

    Are the coordinates in WINDOWPOS on WM_WINDOWPOSCHANGED in parent coordinates or screen coordinates?

  11. 11

    How to calculate transformation from screen coordinates to isometric screen coordinates?

  12. 12

    Points coordinates in multiple screen CoronaSDK

  13. 13

    gl_PointSize to screen coordinates

  14. 14

    GetWindowRect coordinates not screen-relative

  15. 15

    Get the center coordinates of phone screen

  16. 16

    Get Screen-Coordinates of a QuickControl

  17. 17

    Get the center coordinates of phone screen

  18. 18

    Get coordinates (screen) of GridLayout items

  19. 19

    How to project Webcam captured frame coordinates to screen coordinates

  20. 20

    Mac OS X: Convert between NSView coordinates and global screen coordinates

  21. 21

    Game Dev - Working with Screen Coordinates vs World Coordinates

  22. 22

    How to get world coordinates from screen coordinates in Vispy

  23. 23

    How to convert screen coordinates to coordinates on a z transformed element?

  24. 24

    Translate Firebase MLKit Bounding box coordinates to screen view coordinates

  25. 25

    Mac OS X: Convert between NSView coordinates and global screen coordinates

  26. 26

    The coordinates of the plot in R

  27. 27

    Latitude and Longitude coordinates in R

  28. 28

    Math behind finding screen coordinates in a path tracer

  29. 29

    OSX - make cursor click at particular screen coordinates

HotTag

Archive