Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mismatching units and translate issues #4

Open
hugke729 opened this issue Dec 5, 2024 · 0 comments
Open

Mismatching units and translate issues #4

hugke729 opened this issue Dec 5, 2024 · 0 comments

Comments

@hugke729
Copy link

hugke729 commented Dec 5, 2024

I'm using the extension to extract data from line plots saved in PDF files. I've got the extension to work, but it took some trial and error. Consider this bits and pieces of advice for anyone who ends up here in the future:

  1. There maybe a mismatch in units depending on how Inkscape is set up. I have Inkscape default to millimeters, but this extension appears to work in pixels. I get around this by adding scaling doc_h in nodes_to_csv.py as
    doc_h *= 25.4/96
    where 25.4 is millimeters per inch and 96 is what (at least my) Inkscape uses to convert pixels to inches.
  2. If you change a page's dimensions, Inkscape will add a transform=translate(<x>, <y>) into the SVG file. If this happens, the exported node positions seem off. That's because they are not relative to the top left of the original page, not the top left of the current page.
  3. If you want to use only part of a page (e.g., just a graph), I recommend cutting and pasting it into a new document and placing it at the top left corner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant