Skip to content

How to set the size of the output for the drawing addon #357

Answered by mbway
karstenflores asked this question in Q&A
Discussion options

You must be logged in to vote

this can be solved in a way that isn't specific to ezdxf by carefully setting the figure size before saving. Matplotlib is quite complex when it comes to measurements. I have a solution which seems to work well but there may be slight inaccuracies since the calculations are done using floating point numbers but at the end of the day pixels are a discrete measurement so it's probably possible to be at least 1 pixel off. There are probably lots of other things like line widths which have an effect.

Background

The axes of a matplotlib plot have data limits which are of course in units of the data, in the case of ezdxf these are also the units of the CAD file. Then there is the figure size wh…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@mbway
Comment options

@ascaron37
Comment options

@mbway
Comment options

@ascaron37
Comment options

@mozman
Comment options

Answer selected by karstenflores
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants