From dfa9d934ff50898443df8febb946b30014bdf2e2 Mon Sep 17 00:00:00 2001 From: James Ball Date: Thu, 14 Nov 2024 15:35:39 +0100 Subject: [PATCH 1/2] add missing makerings to ucell plot --- ImageD11/nbGui/S3DXRD/tomo_2_map.ipynb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ImageD11/nbGui/S3DXRD/tomo_2_map.ipynb b/ImageD11/nbGui/S3DXRD/tomo_2_map.ipynb index fa442451..7918dc4c 100644 --- a/ImageD11/nbGui/S3DXRD/tomo_2_map.ipynb +++ b/ImageD11/nbGui/S3DXRD/tomo_2_map.ipynb @@ -196,6 +196,8 @@ "\n", "fig, ax = plt.subplots(figsize=(10, 5), constrained_layout=True)\n", "\n", + "ucell.makerings(cf_4d.ds.max())\n", + "\n", "ax.plot(cf_4d.ds, cf_4d.sum_intensity,',', label='cf_4d')\n", "ax.plot(cf_strong.ds, cf_strong.sum_intensity,',', label='cf_strong')\n", "ax.plot(ucell.ringds, [1e4,]*len(ucell.ringds), '|', ms=90, c=\"red\")\n", From f6fb0258f5a5081b851ccb8484ddc9266c9fe021 Mon Sep 17 00:00:00 2001 From: James Ball Date: Fri, 15 Nov 2024 12:03:30 +0100 Subject: [PATCH 2/2] Fix plotting bug --- ImageD11/nbGui/nb_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ImageD11/nbGui/nb_utils.py b/ImageD11/nbGui/nb_utils.py index 24de1bb3..af3274b7 100644 --- a/ImageD11/nbGui/nb_utils.py +++ b/ImageD11/nbGui/nb_utils.py @@ -598,7 +598,7 @@ def plot_grain_positions(grains, colour='npks', centre_plot=False, size_scaling= # will still fail if we don't have reference unitcells get_rgbs_for_grains(grains) col = [getattr(grain, rgbattr) for grain in grains] # IPF colour - ax.set_title("Grains coloured by IPF", colour.lower()) + ax.set_title("Grains coloured by IPF " + colour.lower()) # sizes in MPL 3D scale the area of the plot # intensity info is proportional to volume # decrease to radius then scale to area with power(x, 2/3)