Skip to main content

A fork of mpldxf - a matplotlib backend to write DXF drawings. Modified by NGI to handle geotechnical plots

Project description

Matplotlib Backend for DXF

Overview

This is a Matplotlib backend that enables Matplotlib to save figures as DXF drawings. DXF is a drawing format commonly used by Computer-Aided Design (CAD) tools.

This package builds on the ezdxf package by Manfred Moitzi: ezdxf on Bitbucket

Installation of dependencies

The package dependencies can be installed with uv

uv sync --upgrade
source .venv/bin/activate

Usage

To use this backend, you first need to register it with Matplotlib:

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

Then, you can save a figure as a DXF file:

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

Warning

This package is a work in progress. Not all Matplotlib plot types will render correctly, and text alignment and sizing in particular may require adjustments.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpldxf-1.0.6.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpldxf-1.0.6-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file mpldxf-1.0.6.tar.gz.

File metadata

  • Download URL: mpldxf-1.0.6.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mpldxf-1.0.6.tar.gz
Algorithm Hash digest
SHA256 da16d4ac58c91051483ddf420a5e6a4159ec4c1afec7c4aede932374b35423b9
MD5 dffcb050a8be262f634368277c8e1d59
BLAKE2b-256 6c7a86fdeb72f5fb8fd516158e62aa4ccb750f29e71ccd3bf74e2dc9e65b82e6

See more details on using hashes here.

File details

Details for the file mpldxf-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: mpldxf-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for mpldxf-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4b9eb817fe7e09a3311e40fd1f26a44e89a87611d46e4b19f54cc5d2dfbb6a70
MD5 44b3c5fe2dc2f3a12a0c692ecb1fdb00
BLAKE2b-256 595533260d222242217d94744ea2c3d476d2e03c8b078457347970c96983bded

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page