Skip to content

subsurfaceiodev/mpldxf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Matplotlib backend for dxf

Overview

This is a matplotlib backend that enables matplotlib to save figures as DXF drawings. DXF is a drawing format that is used by computer aided design (CAD) tools.

This package builds on the ezdxf package by Manfred Moitzi:

http://bitbucket.org/mozman/ezdxf

Usage

First you need to register the backend with matplotlib:

import matplotlib
from mpldxf import FigureCanvasDxf
matplotlib.backend_bases.register_backend('dxf', FigureCanvasDxf)

You can then save your figure:

from matplotlib import pyplot as plt
plt.plot(range(10))
plt.savefig('myplot.dxf')

Warning

This is very much a work in progress. Not all matplotlib plot types will render correctly. Text alignment and sizing in particular need work.

About

Matplotlib backend for DXF

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 60.2%
  • Max 33.0%
  • Common Lisp 6.8%