hexrdgui
hexrdgui copied to clipboard
colors for plotting structures
Can the colors that XRD reflections use for plotting in the integration view be changed to matplotlib default? Or something similar?
Do you mean the plotting for the powder overlay reflections? In the overlay manager, if you click on the row for the overlay of interest, and you click on the "Edit Style" button, a dialog appears where you can edit the styles for the overlay.
The default settings are here, and we can change them.
@akrygier Let us know if you have suggested changes for the defaults.
Sorry I missed this before.
I typically use 2theta = 15 azimuth = 60
Not sure that’s absolutely optimal, but it works well enough for the tardis data I have looked at.
On Wed, Apr 5, 2023 at 5:17 AM Patrick Avery @.***> wrote:
@akrygier https://github.com/akrygier Let us know if you have suggested changes for the defaults https://github.com/HEXRD/hexrdgui/blob/a21da7f8e00ba1bb120b40c617b2536fb67671e2/hexrd/ui/overlays/powder_overlay.py#L504-L517 .
— Reply to this email directly, view it on GitHub https://github.com/HEXRD/hexrdgui/issues/1364#issuecomment-1497391949, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOI42NHKHSGH6DISE4ONXJTW7VPFRANCNFSM6AAAAAAWJY56KE . You are receiving this because you were mentioned.Message ID: @.***>
--
- Andy
Sorry misread.
The colors I was thinking are just the matplotlib default cycle.
On Wed, Apr 5, 2023 at 8:14 PM Andy Krygier @.***> wrote:
Sorry I missed this before.
I typically use 2theta = 15 azimuth = 60
Not sure that’s absolutely optimal, but it works well enough for the tardis data I have looked at.
On Wed, Apr 5, 2023 at 5:17 AM Patrick Avery @.***> wrote:
@akrygier https://github.com/akrygier Let us know if you have suggested changes for the defaults https://github.com/HEXRD/hexrdgui/blob/a21da7f8e00ba1bb120b40c617b2536fb67671e2/hexrd/ui/overlays/powder_overlay.py#L504-L517 .
— Reply to this email directly, view it on GitHub https://github.com/HEXRD/hexrdgui/issues/1364#issuecomment-1497391949, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOI42NHKHSGH6DISE4ONXJTW7VPFRANCNFSM6AAAAAAWJY56KE . You are receiving this because you were mentioned.Message ID: @.***>
--
- Andy
--
- Andy
Sounds good. I can take a look at what matplotlib uses in their default cycle.
They should just cycle by default [blue, orange, so on] without specifying the color directly Or you can call them by color='CN' where N is in [0:9] in a plt.plot().
Here are the hex codes:
import matplotlib.pyplot as plt
#display hex color codes print(plt.rcParams['axes.prop_cycle'].by_key()['color'])
['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf']