matmalib 0.2.2__tar.gz → 0.2.4__tar.gz
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.
- {matmalib-0.2.2 → matmalib-0.2.4}/PKG-INFO +1 -1
- {matmalib-0.2.2 → matmalib-0.2.4}/matmalib/viz.py +30 -29
- {matmalib-0.2.2 → matmalib-0.2.4}/matmalib.egg-info/PKG-INFO +1 -1
- {matmalib-0.2.2 → matmalib-0.2.4}/pyproject.toml +2 -2
- {matmalib-0.2.2 → matmalib-0.2.4}/README.md +0 -0
- {matmalib-0.2.2 → matmalib-0.2.4}/matmalib/__init__.py +0 -0
- {matmalib-0.2.2 → matmalib-0.2.4}/matmalib/calc.py +0 -0
- {matmalib-0.2.2 → matmalib-0.2.4}/matmalib/core.py +0 -0
- {matmalib-0.2.2 → matmalib-0.2.4}/matmalib/util.py +0 -0
- {matmalib-0.2.2 → matmalib-0.2.4}/matmalib.egg-info/SOURCES.txt +0 -0
- {matmalib-0.2.2 → matmalib-0.2.4}/matmalib.egg-info/dependency_links.txt +0 -0
- {matmalib-0.2.2 → matmalib-0.2.4}/matmalib.egg-info/top_level.txt +0 -0
- {matmalib-0.2.2 → matmalib-0.2.4}/setup.cfg +0 -0
- {matmalib-0.2.2 → matmalib-0.2.4}/setup.py +0 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from turtle import color
|
|
2
|
-
|
|
3
1
|
import matplotlib
|
|
4
2
|
import numpy as np
|
|
5
3
|
import matplotlib.pyplot as plt
|
|
@@ -382,7 +380,7 @@ class Plot():
|
|
|
382
380
|
# plot = ax.contourf(x_edges[:-1], y_edges[:-1], Hall.T, cmap=cmap, zorder=1, levels=num_levels)
|
|
383
381
|
|
|
384
382
|
cb_ticks = np.linspace(vmin, vmax, 6)
|
|
385
|
-
cb = fig.colorbar(plot, ax=ax, ticks=cb_ticks, pad=0.05, shrink=0.
|
|
383
|
+
cb = fig.colorbar(plot, ax=ax, ticks=cb_ticks, pad=0.05, shrink=0.6)
|
|
386
384
|
cb.ax.set_yticklabels([f"{tick:.1f}" for tick in cb_ticks], fontsize=12)
|
|
387
385
|
cb.set_label("\n Free energy [kJ]", fontsize=14)
|
|
388
386
|
|
|
@@ -408,8 +406,13 @@ class Plot():
|
|
|
408
406
|
:param limit: (Int) The upper limit on your energy scale
|
|
409
407
|
"""
|
|
410
408
|
|
|
411
|
-
|
|
412
|
-
|
|
409
|
+
if not isinstance(xpm_data_list, list):
|
|
410
|
+
xpm_data_list = [xpm_data_list]
|
|
411
|
+
|
|
412
|
+
if len(xpm_data_list) == 1:
|
|
413
|
+
self.path = xpm_data_list[0].path
|
|
414
|
+
else:
|
|
415
|
+
self.path = xpm_data_list[0].path
|
|
413
416
|
|
|
414
417
|
Mat = []
|
|
415
418
|
|
|
@@ -440,38 +443,36 @@ class Plot():
|
|
|
440
443
|
fig, axes = plt.subplots(1, len(Mat), figsize=(4 * len(Mat) + (len(Mat) - 1) * 1, 4), sharex=True, sharey=True)
|
|
441
444
|
# fig, axes = plt.subplots(1,len(Mat), figsize=(4*len(Mat) + 1.5, 4), sharex=True, sharey=True)
|
|
442
445
|
|
|
443
|
-
color_bar = ['Blues_r'] * len(Mat)
|
|
444
|
-
color = self.colors
|
|
445
|
-
color.reverse()
|
|
446
|
-
cmap = ListedColormap(color)
|
|
447
|
-
|
|
448
446
|
levels = np.linspace(0, limit, 9) # 8 levels between 0 and limit
|
|
447
|
+
if len(Mat) > 1:
|
|
448
|
+
for n, ax in enumerate(axes):
|
|
449
|
+
|
|
450
|
+
self.set_axes(ax)
|
|
451
|
+
dx = ax.get_xlim()[1] - ax.get_xlim()[0]
|
|
452
|
+
dy = ax.get_ylim()[1] - ax.get_ylim()[0]
|
|
449
453
|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
ax.grid(True, ls='--', zorder=10.0)
|
|
454
|
+
ax.set_aspect(dx/dy, adjustable='box')
|
|
455
|
+
ax.grid(True, ls='--', zorder=10.0)
|
|
453
456
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
xticks = np.linspace(xmin, xmax, 7)
|
|
457
|
-
ax.set_xticks(np.linspace(0, 71, 7))
|
|
458
|
-
ax.set_xticklabels(['{0:d}'.format(int(x)) for x in xticks], fontsize=12)
|
|
459
|
-
ax.set_xlabel(r'$\phi$', fontsize=14)
|
|
457
|
+
# Create the contourf plot with consistent levels
|
|
458
|
+
plot = ax.contourf(Mat[n], levels=levels, colors=self.colors, zorder=1)
|
|
460
459
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
460
|
+
# Add a color bar with consistent boundaries and ticks
|
|
461
|
+
cb = fig.colorbar(plot, ax=ax, pad=0.025, aspect=20, ticks=levels, shrink=0.7)
|
|
462
|
+
cb.set_ticklabels(["{0:3.1f}".format(x) for x in levels])
|
|
463
|
+
else:
|
|
464
|
+
self.set_axes(axes)
|
|
465
|
+
dx = axes.get_xlim()[1] - axes.get_xlim()[0]
|
|
466
|
+
dy = axes.get_ylim()[1] - axes.get_ylim()[0]
|
|
466
467
|
|
|
467
|
-
|
|
468
|
-
|
|
468
|
+
axes.set_aspect(dx / dy, adjustable='box')
|
|
469
|
+
axes.grid(True, ls='--', zorder=10.0)
|
|
469
470
|
|
|
470
471
|
# Create the contourf plot with consistent levels
|
|
471
|
-
plot =
|
|
472
|
+
plot = axes.contourf(Mat[0], levels=levels, colors=self.colors, zorder=1)
|
|
472
473
|
|
|
473
474
|
# Add a color bar with consistent boundaries and ticks
|
|
474
|
-
cb = fig.colorbar(plot, ax=
|
|
475
|
+
cb = fig.colorbar(plot, ax=axes, pad=0.025, aspect=20, ticks=levels, shrink=0.7)
|
|
475
476
|
cb.set_ticklabels(["{0:3.1f}".format(x) for x in levels])
|
|
476
477
|
|
|
477
478
|
fig.tight_layout()
|
|
@@ -750,4 +751,4 @@ class Plot():
|
|
|
750
751
|
plt.ylabel(f"{quant} (Ha)")
|
|
751
752
|
plt.xlabel('conformer id')
|
|
752
753
|
|
|
753
|
-
self.set_axes(ax)
|
|
754
|
+
self.set_axes(ax)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "matmalib"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.4"
|
|
4
4
|
description = "Add your description here"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.12"
|
|
7
7
|
|
|
8
8
|
[tool.bumpversion]
|
|
9
|
-
current_version = "0.2.
|
|
9
|
+
current_version = "0.2.4"
|
|
10
10
|
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
|
11
11
|
serialize = ["{major}.{minor}.{patch}"]
|
|
12
12
|
search = "{current_version}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|