kx-plot 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ # Tableau 10 (T10): matplotlib's default colour cycle, handy to get it back under a themed cycle
2
+ # Tableau, as shipped with matplotlib
3
+ 1F77B4
4
+ FF7F0E
5
+ 2CA02C
6
+ D62728
7
+ 9467BD
8
+ 8C564B
9
+ E377C2
10
+ 7F7F7F
11
+ BCBD22
12
+ 17BECF
@@ -0,0 +1,12 @@
1
+ # Tableau Color Blind 10: blues, oranges and greys that survive red-green colour blindness
2
+ # Tableau, as shipped with matplotlib
3
+ 006BA4
4
+ FF800E
5
+ ABABAB
6
+ 595959
7
+ 5F9ED1
8
+ C85200
9
+ 898989
10
+ A2C8EC
11
+ FFBC79
12
+ CFCFCF
@@ -0,0 +1,9 @@
1
+ # Paul Tol Bright: 7 colours, colour-blind safe
2
+ # https://sronpersonalpages.nl/~pault/
3
+ 4477AA
4
+ 66CCEE
5
+ 228833
6
+ CCBB44
7
+ EE6677
8
+ AA3377
9
+ BBBBBB
@@ -0,0 +1,6 @@
1
+ # Paul Tol High Contrast: 3 colours that also work in greyscale
2
+ # (Tol's white and black are background/text, so not in the cycle)
3
+ # https://sronpersonalpages.nl/~pault/
4
+ 004488
5
+ DDAA33
6
+ BB5566
@@ -0,0 +1,9 @@
1
+ # Paul Tol Medium Contrast: 3 light/dark pairs (blue, yellow, red), also work in greyscale
2
+ # (Tol's white and black are background/text, so not in the cycle)
3
+ # https://sronpersonalpages.nl/~pault/
4
+ 6699CC
5
+ 004488
6
+ EECC66
7
+ 994455
8
+ 997700
9
+ EE99AA
@@ -0,0 +1,9 @@
1
+ # Paul Tol Vibrant: 7 colours, colour-blind safe
2
+ # https://sronpersonalpages.nl/~pault/
3
+ 0077BB
4
+ 33BBEE
5
+ 009988
6
+ EE7733
7
+ CC3311
8
+ EE3377
9
+ BBBBBB
@@ -0,0 +1,29 @@
1
+ # greyscale print: black-to-grey cycle paired with linestyles, serif, white background
2
+ figure.facecolor: FFFFFF
3
+ axes.facecolor: FFFFFF
4
+ savefig.facecolor: FFFFFF
5
+ text.color: 000000
6
+ axes.labelcolor: 000000
7
+ axes.edgecolor: 000000
8
+ xtick.color: 000000
9
+ ytick.color: 000000
10
+ grid.color: D9D9D9
11
+ grid.linestyle: -
12
+ grid.linewidth: 0.6
13
+ axes.prop_cycle: cycler('color', ['000000', '595959', '8C8C8C', '000000', '595959', '8C8C8C']) + cycler('linestyle', ['-', '--', ':', '-.', '-', '--'])
14
+ image.cmap: Greys
15
+ figure.figsize: 6, 3.5
16
+ figure.dpi: 110
17
+ savefig.dpi: 300
18
+ savefig.bbox: tight
19
+ font.family: serif
20
+ font.serif: DejaVu Serif, Times New Roman, Times, serif
21
+ mathtext.fontset: dejavuserif
22
+ font.size: 10
23
+ axes.titlesize: 11
24
+ axes.spines.top: False
25
+ axes.spines.right: False
26
+ legend.frameon: False
27
+ lines.linewidth: 1.4
28
+ lines.markersize: 4
29
+ hatch.color: 000000
@@ -0,0 +1,36 @@
1
+ # posters: 4:3, very large sans type, heavy lines, legible from a few metres away
2
+ figure.facecolor: FFFFFF
3
+ axes.facecolor: FFFFFF
4
+ savefig.facecolor: FFFFFF
5
+ text.color: 111111
6
+ axes.labelcolor: 111111
7
+ xtick.color: 222222
8
+ ytick.color: 222222
9
+ axes.edgecolor: 444444
10
+ axes.linewidth: 2.5
11
+ grid.color: DDDDDD
12
+ grid.linewidth: 1.5
13
+ axes.spines.top: False
14
+ axes.spines.right: False
15
+ axes.prop_cycle: cycler('color', ['0072B2', 'E69F00', '009E73', 'D55E00', 'CC79A7', '56B4E9'])
16
+ figure.figsize: 12, 9
17
+ figure.dpi: 80
18
+ savefig.dpi: 300
19
+ savefig.bbox: tight
20
+ font.family: sans-serif
21
+ font.size: 26
22
+ axes.titlesize: 32
23
+ axes.titleweight: bold
24
+ axes.labelsize: 28
25
+ xtick.labelsize: 24
26
+ ytick.labelsize: 24
27
+ legend.fontsize: 24
28
+ legend.frameon: False
29
+ xtick.major.size: 10
30
+ ytick.major.size: 10
31
+ xtick.major.width: 2.5
32
+ ytick.major.width: 2.5
33
+ xtick.major.pad: 8
34
+ ytick.major.pad: 8
35
+ lines.linewidth: 4.5
36
+ lines.markersize: 13
@@ -0,0 +1,44 @@
1
+ # journal single column: 3.5 in wide, 8 pt serif, inward ticks on all four sides
2
+ figure.facecolor: FFFFFF
3
+ axes.facecolor: FFFFFF
4
+ savefig.facecolor: FFFFFF
5
+ text.color: 000000
6
+ axes.labelcolor: 000000
7
+ axes.edgecolor: 000000
8
+ axes.linewidth: 0.6
9
+ axes.prop_cycle: cycler('color', ['4477AA', 'EE6677', '228833', 'CCBB44', '66CCEE', 'AA3377', 'BBBBBB'])
10
+ image.cmap: viridis
11
+ figure.figsize: 3.5, 2.6
12
+ figure.dpi: 150
13
+ savefig.dpi: 600
14
+ savefig.bbox: tight
15
+ savefig.pad_inches: 0.02
16
+ font.family: serif
17
+ font.serif: DejaVu Serif, Times New Roman, Times, serif
18
+ mathtext.fontset: dejavuserif
19
+ font.size: 8
20
+ axes.titlesize: 8
21
+ axes.labelsize: 8
22
+ xtick.labelsize: 7
23
+ ytick.labelsize: 7
24
+ legend.fontsize: 7
25
+ legend.frameon: False
26
+ legend.handlelength: 1.6
27
+ xtick.direction: in
28
+ ytick.direction: in
29
+ xtick.top: True
30
+ ytick.right: True
31
+ xtick.minor.visible: True
32
+ ytick.minor.visible: True
33
+ xtick.major.size: 3
34
+ ytick.major.size: 3
35
+ xtick.minor.size: 1.5
36
+ ytick.minor.size: 1.5
37
+ xtick.major.width: 0.5
38
+ ytick.major.width: 0.5
39
+ xtick.minor.width: 0.5
40
+ ytick.minor.width: 0.5
41
+ grid.linewidth: 0.4
42
+ grid.color: DDDDDD
43
+ lines.linewidth: 1
44
+ lines.markersize: 3
@@ -0,0 +1,34 @@
1
+ # slides: 16:9, large sans type, thick lines, readable from the back of the room
2
+ figure.facecolor: FFFFFF
3
+ axes.facecolor: FFFFFF
4
+ savefig.facecolor: FFFFFF
5
+ text.color: 1A1A1A
6
+ axes.labelcolor: 1A1A1A
7
+ xtick.color: 333333
8
+ ytick.color: 333333
9
+ axes.edgecolor: 555555
10
+ axes.linewidth: 1.5
11
+ grid.color: E0E0E0
12
+ grid.linewidth: 1
13
+ axes.spines.top: False
14
+ axes.spines.right: False
15
+ axes.prop_cycle: cycler('color', ['0072B2', 'E69F00', '009E73', 'D55E00', 'CC79A7', '56B4E9'])
16
+ figure.figsize: 10, 5.625
17
+ figure.dpi: 100
18
+ savefig.dpi: 200
19
+ savefig.bbox: tight
20
+ font.family: sans-serif
21
+ font.size: 18
22
+ axes.titlesize: 22
23
+ axes.titleweight: bold
24
+ axes.labelsize: 18
25
+ xtick.labelsize: 16
26
+ ytick.labelsize: 16
27
+ legend.fontsize: 16
28
+ legend.frameon: False
29
+ xtick.major.size: 7
30
+ ytick.major.size: 7
31
+ xtick.major.width: 1.5
32
+ ytick.major.width: 1.5
33
+ lines.linewidth: 3
34
+ lines.markersize: 9
@@ -0,0 +1,35 @@
1
+ # thesis: 6.3 in = 160 mm A4 text width (25 mm margins), Computer Modern 10/9 pt, no LaTeX needed
2
+ figure.facecolor: FFFFFF
3
+ axes.facecolor: FFFFFF
4
+ savefig.facecolor: FFFFFF
5
+ text.color: 000000
6
+ axes.labelcolor: 000000
7
+ axes.edgecolor: 000000
8
+ axes.linewidth: 0.8
9
+ axes.prop_cycle: cycler('color', ['0072B2', 'D55E00', '009E73', 'CC79A7', 'E69F00', '56B4E9', '000000'])
10
+ figure.figsize: 6.3, 3.9
11
+ figure.dpi: 110
12
+ savefig.dpi: 300
13
+ savefig.bbox: tight
14
+ savefig.pad_inches: 0.03
15
+ savefig.format: pdf
16
+ font.family: serif
17
+ font.serif: cmr10
18
+ mathtext.fontset: cm
19
+ axes.formatter.use_mathtext: True
20
+ axes.unicode_minus: True
21
+ font.size: 10
22
+ axes.titlesize: 10
23
+ axes.labelsize: 10
24
+ xtick.labelsize: 9
25
+ ytick.labelsize: 9
26
+ legend.fontsize: 9
27
+ legend.frameon: False
28
+ axes.spines.top: False
29
+ axes.spines.right: False
30
+ xtick.direction: out
31
+ ytick.direction: out
32
+ grid.color: E5E5E5
33
+ grid.linewidth: 0.5
34
+ lines.linewidth: 1.3
35
+ lines.markersize: 4
@@ -0,0 +1,114 @@
1
+ Metadata-Version: 2.5
2
+ Name: kx-plot
3
+ Version: 0.1.0
4
+ Summary: One-line matplotlib plots and themes for notebook and scripts, Kaggle-friendly
5
+ Project-URL: Homepage, https://github.com/vhrabar/kx-plot
6
+ Project-URL: Issues, https://github.com/vhrabar/kx-plot/issues
7
+ Project-URL: Changelog, https://github.com/vhrabar/kx-plot/blob/main/CHANGELOG.md
8
+ Project-URL: Kaggle, https://www.kaggle.com/datasets/vhrabar/kx-plot
9
+ Author-email: Vedran Hrabar <vedran.hrabar@outlook.com>
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ License-File: kx/styles/palettes/LICENCES.md
13
+ Keywords: jupyter,kaggle,matplotlib,plotting,themes,visualization
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Framework :: Jupyter
16
+ Classifier: Framework :: Matplotlib
17
+ Classifier: Intended Audience :: Science/Research
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Topic :: Scientific/Engineering :: Visualization
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: matplotlib>=3.7
24
+ Requires-Dist: numpy>=1.23
25
+ Requires-Dist: pandas>=1.5
26
+ Description-Content-Type: text/markdown
27
+
28
+ # kx-plot
29
+
30
+ One-line matplotlib plots and themes for notebooks and scripts.
31
+
32
+ `kx` is a small, plain-Python package with `.mplstyle` themes, palettes and colourmaps. It needs nothing beyond
33
+ matplotlib, numpy and pandas and works offline, so it also runs in Kaggle competition notebooks.
34
+
35
+ ![dark theme](https://raw.githubusercontent.com/vhrabar/kx-plot/main/previews/dark.png)
36
+
37
+ ## Install
38
+
39
+ ```bash
40
+ pip install kx-plot
41
+ ```
42
+
43
+ ```python
44
+ import kx; kx.use('dark')
45
+ ```
46
+
47
+ ### Kaggle
48
+
49
+ With internet off (competition notebooks), attach the dataset instead (**Add Input → Datasets → `vhrabar/kx-plot`**), then:
50
+
51
+ ```python
52
+ import sys; sys.path.append('/kaggle/input/datasets/vhrabar/kx-plot')
53
+ import kx; kx.use('dark')
54
+ ```
55
+
56
+ ## Usage
57
+
58
+ ```python
59
+ kx.use('light', palette='okabe', cmap='cividis') # notebook default: theme, palette, colormap
60
+ kx.plot(x, y, z, 'scatter-grid-leg') # spec: kind-theme-flag-...
61
+ kx.plot(x, y, 'bar-paper') # a theme in the spec applies to this plot only
62
+ ```
63
+
64
+ | Token | Values |
65
+ |-------|--------------------------------------------------------------------|
66
+ | kind | `line` `step` `area` `band` `scatter` `bar` `hist` |
67
+ | theme | `dark` `light` `paper` `science` `talk` `poster` `thesis` |
68
+ | flags | `grid` `leg` `logx` `logy` `tight`, plus `stack` `norm` for `area` |
69
+
70
+ Unknown tokens raise an error instead of being guessed. Everything is inspectable:
71
+ `kx.grammar()`, `kx.grammar('area')`, `kx.show('dark')`, `kx.source('scatter')`.
72
+
73
+ rcParams can be overridden in `kx.use` with `__` for dots: `kx.use('dark', figure__figsize=(8, 4))`.
74
+
75
+ ## Palettes
76
+
77
+ Palettes for `kx.use(theme, palette=...)`, they swap only the colours; a theme's
78
+ other cycled properties (such as `paper`'s linestyles) stay.
79
+
80
+ | Name | Source |
81
+ |------------------------------------------|--------------------|
82
+ | `okabe` | Okabe & Ito (2008) |
83
+ | `tolbright` `tolvibrant` `tolhc` `tolmc` | Paul Tol |
84
+ | `petroff6` `petroff8` `petroff10` | Petroff (2021) |
85
+ | `tab10` `tableaucb` | Tableau |
86
+ | `set2` `dark2` | ColorBrewer |
87
+ | `ibm` | IBM Design Colors |
88
+
89
+ `kx.palette('okabe')` returns the hex codes. A list of colours works too: `palette=['#264653', '#e9c46a']`.
90
+
91
+ ## Colourmaps
92
+
93
+ Colourmaps for `kx.use(theme, cmap=...)` colour continuous values, such as a numeric `z` in `scatter`.
94
+ Without `cmap`, the theme's own default applies.
95
+
96
+ | Name | Type |
97
+ |------------------------------------------------|----------------------------------|
98
+ | `viridis` `magma` `plasma` `inferno` `cividis` | Sequential, perceptually uniform |
99
+ | `turbo` | Sequential, rainbow |
100
+ | `coolwarm` | Diverging |
101
+ | `berlin` `managua` `vanimo` | Diverging, dark centre |
102
+ | `twilight` | Cyclic, for angles and phases |
103
+
104
+ `kx.cmaps()` lists the ones that are available in the installed matplotlib as those implemented in matplotlib 3.10 or newer
105
+ are not vendored.
106
+
107
+
108
+ ## License
109
+
110
+ Released under the MIT License. See [`LICENSE`](https://github.com/vhrabar/kx-plot/blob/main/LICENSE).
111
+
112
+ Copyright © 2026 Vedran Hrabar
113
+
114
+ Vendored palettes keep their own licences; see [`kx/styles/palettes/LICENCES.md`](https://github.com/vhrabar/kx-plot/blob/main/kx/styles/palettes/LICENCES.md).
@@ -0,0 +1,40 @@
1
+ kx/__init__.py,sha256=WfUNXdm2_KrXwqL5NSMAzGs2crv0pi_wMtw0UB7yBKs,2662
2
+ kx/_data.py,sha256=tZs9Y1wQKjt1CB8kpYvjto0KvYZo6SqOtc-7J5E8Gts,467
3
+ kx/_files.py,sha256=fC3WLbkUBvkRfRn53CgWwOcPQ2BWinHmcW3YZ3BJS8g,558
4
+ kx/_plot.py,sha256=0s5jYXKN9sbkQ7pgVHWuK7Gs-6y83PXXkeOZmsll_KA,1809
5
+ kx/_spec.py,sha256=mvwL7b6Mxw1ODHGAroGt8g1kfzG5zSevuMxvveT_M3M,2421
6
+ kx/_theme.py,sha256=ovNjFn3a96-JELaRKZ5MqVABQ6PC5UweovfTokvZcfc,2893
7
+ kx/_util.py,sha256=Nxxtsm1khYOMqlMPG3MKLlhkzV1mt5QYwIhyDO-ySMg,794
8
+ kx/data/cloud.csv,sha256=0clcosVUR3uJdf81Wtj-dokyDGVcskqR3L2f6TYDnlY,4446
9
+ kx/data/dists.csv,sha256=WzjHt9wkIxt3XiPXqkga0RxnkVr149LUzwH0f4-K3CE,11113
10
+ kx/data/monthly.csv,sha256=s_xC5dX3n7MjClr7zia47IMlUxozk9RnNi-gTPsT-Ew,153
11
+ kx/data/waves.csv,sha256=DNST1s9Egz2jih5DOBoioFtSdvEDKLRgAhiqB31u6-4,1287
12
+ kx/kinds/__init__.py,sha256=zsuUBV3ZfUFBXa-b2YvTCoWXZakMKinqiGmMt42CJIs,133
13
+ kx/kinds/basic.py,sha256=jaLaLAN9BaJ6XAPF_W0mzamXeFesloL3i3WGSDjeLyA,3623
14
+ kx/kinds/dist.py,sha256=4Xs6gN9AOfGmcxGJtUjTDb4Ink4uMPKVGzjqIlrFJF4,484
15
+ kx/styles/dark.mplstyle,sha256=A4dHDnQz2rub0BdB8R9963xxw0dXiMWJgmaV46k4_Z0,561
16
+ kx/styles/light.mplstyle,sha256=zTX8Rv72jscZonih4mY_p88xxofq0gIEVsWbfSwt3AE,447
17
+ kx/styles/paper.mplstyle,sha256=Dbo1hwq7dGlrue_Mh-Fz3Q9CsKUd5RQO5nFI-AvHEL8,923
18
+ kx/styles/poster.mplstyle,sha256=PPSXtzvmEOZTil89DtAvdlv6_nMo9NmKlh7Ad_Qq80w,961
19
+ kx/styles/science.mplstyle,sha256=t-165_rLAZED4znGREphoFRZF453xJ4NpJwBPbYdOzM,1194
20
+ kx/styles/talk.mplstyle,sha256=45BTvuVGKebpbTj73aw5fUdnx6CzYMZJGgRzQ9KJH4k,918
21
+ kx/styles/thesis.mplstyle,sha256=6cA65xv-apqSdp3G6fRiDLt8Ul6rhqH6FwKpDMmMAFY,976
22
+ kx/styles/palettes/LICENCES.md,sha256=7LC9_tlmxypH6dPvmyIlI9EDIbzgjNFuRlW9PXs6tLQ,28319
23
+ kx/styles/palettes/dark2.txt,sha256=MITBFW71ZsZQ8wGfhsCsNiqy_85RPfCVarx6D7qOArk,223
24
+ kx/styles/palettes/ibm.txt,sha256=7MLeDG0C3g0QhrkxvMeT1rdC69K3Uoq_UcmzvER7NWw,91
25
+ kx/styles/palettes/okabe.txt,sha256=krTjT8ndeDnCisdZ9srSDbCUGlqTUS27FgNV6td6xhY,193
26
+ kx/styles/palettes/petroff10.txt,sha256=CzUOMz3xqIsSJjyGktVZpoiR_zo5CdOt6ZZK9NNjkDQ,251
27
+ kx/styles/palettes/petroff6.txt,sha256=mgHMvsF8iIxbYFSDrmjySm7KmJ1dcycd-uDG2cpkjxs,222
28
+ kx/styles/palettes/petroff8.txt,sha256=hkwPZzc4ljd_0wwE5_vY-lmyeMtXd_MzJ69aKQn0jVg,236
29
+ kx/styles/palettes/set2.txt,sha256=8oV7NpmoUOtNfTcUJfhbsmW__7iyFLe4gg8HW9DoLRc,218
30
+ kx/styles/palettes/tab10.txt,sha256=42pw5_w1x7pMVDq9XlNJY8sefhPmQpR4IVQHYQaPDSw,205
31
+ kx/styles/palettes/tableaucb.txt,sha256=qX1MWA5Gq6fmb8EqvW5TeGxlddDIHAb3hNykM0VymM8,199
32
+ kx/styles/palettes/tolbright.txt,sha256=XJU03xYHsbuCTt7Ok-lwt_HiKzxDi18tTDXf0HEsMac,136
33
+ kx/styles/palettes/tolhc.txt,sha256=0IuyZ1wwiszokbz_EukPxkrvyCioAjBZVUUAm_sfFDA,191
34
+ kx/styles/palettes/tolmc.txt,sha256=apVC0I3DgxHi4pGR4oXNb-44HjuKypIkWUIWA4vezpA,239
35
+ kx/styles/palettes/tolvibrant.txt,sha256=yHLa1jlo2NDq9JbJ6eNlRYFexymUxAV_6Jz_T0HNdKw,136
36
+ kx_plot-0.1.0.dist-info/METADATA,sha256=WZVwtInzZR49YxBXhRxvnCkfDgfha6FIAvr-zstsclc,4842
37
+ kx_plot-0.1.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
38
+ kx_plot-0.1.0.dist-info/licenses/LICENSE,sha256=4QbVWoXpteU4ITV9JyNP1EL79Wh1LandmUWuaZmMbt8,1070
39
+ kx_plot-0.1.0.dist-info/licenses/kx/styles/palettes/LICENCES.md,sha256=7LC9_tlmxypH6dPvmyIlI9EDIbzgjNFuRlW9PXs6tLQ,28319
40
+ kx_plot-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.4
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vedran Hrabar
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.