maliang-mpl
https://xiaokang2022.github.io/tkintertools/
Extension package of maliang for matplotlib
📦 Installation
pip install tkintertools-mpl
👀 Preview
import math
import matplotlib.figure
import numpy
import tkintertools
from tkintertools import mpl, theme
mpl.set_mpl_default_theme(theme.get_color_mode())
x = numpy.linspace(-math.tau, math.tau, 100)
y = numpy.sin(x)
figure = matplotlib.figure.Figure()
axes = figure.add_subplot()
axes.plot(x, y)
axes.set(xlabel='x', ylabel='y', title='Plotting based on the theme in tkt')
axes.legend(["$y=sin(x)$"])
axes.grid()
root = tkintertools.Tk((960, 720), title="tkintertools-mpl")
root.center()
canvas = tkintertools.Canvas(auto_zoom=True)
canvas.place(width=960, height=720)
figure_canvas = mpl.FigureCanvas(canvas, figure)
toolbar = mpl.FigureToolbar(canvas, figure_canvas)
figure_canvas.pack(side="top", fill="both", expand=True)
root.mainloop()
import matplotlib.figure
import numpy
import tkintertools
from tkintertools import mpl, theme
mpl.set_mpl_default_theme(theme.get_color_mode())
figure = matplotlib.figure.Figure()
axes = figure.add_subplot(projection='3d')
colors = ['r', 'g', 'b', 'y']
yticks = [3, 2, 1, 0]
for c, k in zip(colors, yticks):
xs = numpy.arange(20)
ys = numpy.random.rand(20)
cs = [c] * len(xs)
cs[0] = 'c'
axes.bar(xs, ys, zs=k, zdir='y', color=cs, alpha=0.7)
axes.set_xlabel('X')
axes.set_ylabel('Y')
axes.set_zlabel('Z')
axes.set_title("3D plotting with interoperability")
axes.set_yticks(yticks)
root = tkintertools.Tk((960, 720), title="tkintertools-mpl")
root.center()
canvas = tkintertools.Canvas(auto_update=True)
canvas.place(width=960, height=720)
figure_canvas = mpl.FigureCanvas(canvas, figure)
toolbar = mpl.FigureToolbar(canvas, figure_canvas)
figure_canvas.pack(side="top", fill="both", expand=True)
root.mainloop()
Release files for maliang-mpl 1.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| maliang_mpl-1.2.3.tar.gz | 7.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| maliang_mpl-1.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.5 kB
Release files / maliang_mpl-1.2.3.tar.gz
| Download URL | maliang_mpl-1.2.3.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbe9ae457fcb10f7a5ef830fa4561cb3de1faeba0092f15f7b90db5cb7995f10
|
|
BLAKE2b-256 checksum How to use checksums |
095335f78d9aeea8b1b21125ac6e22898afdcd13a0bfb98213cb70743d0e4e9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|
Release files / maliang_mpl-1.2.3-py3-none-any.whl
| Download URL | maliang_mpl-1.2.3-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
434941e0fe8c043f131c1fbef47c0c0b712480582396280288179d9be9ba6f7d
|
|
BLAKE2b-256 checksum How to use checksums |
4d97840b54871cbaa16de793ba0c63e68a622c679e3bb996c3ae438b5b976fb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.13.0
|