Skip to main content

tkintertools-mpl

https://xiaokang2022.github.io/tkintertools/

Extension package of tkintertools for matplotlib

Version Downloads Total Downloads Size
Watchers Forks Stars Issues Pull Requests Discussions

Insights

Star History Chart

📦 Installation

pip install tkintertools-mpl

👀 Preview

preview-1

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()

preview-2

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 tkintertools-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)

Source distribution for tkintertools-mpl 1.2.3
File Size Uploaded
tkintertools_mpl-1.2.3.tar.gz 8.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tkintertools-mpl 1.2.3
File Interpreter ABI Platform
tkintertools_mpl-1.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.7 kB

Release files / tkintertools_mpl-1.2.3.tar.gz

Download URL tkintertools_mpl-1.2.3.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
70169a55cbaa505886b557d5f9685553de18df1d026be76d3c378cd8ca00e00a
BLAKE2b-256 checksum
How to use checksums
d9a5379e4eed947156476ad538203e4bf049ac746377871088e4c23f5050d39e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.0

Release files / tkintertools_mpl-1.2.3-py3-none-any.whl

Download URL tkintertools_mpl-1.2.3-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
074e18f79fa63e98165a1f123844b2d29b4a88c8f507bc526903e3db5df5f697
BLAKE2b-256 checksum
How to use checksums
f49e1d6b7a799ee1b01fc65bcca14d11eded677bb5892b41f20ffa3c36d5529c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.0

Release history Release notifications | RSS feed

This release

1.2.3 This release

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page