You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When plotting the same grain configuration twice, the displayed colors are different because colors are randomly allocated to each grain. This is not only annoying when making comparisons, but it can also deceive people who do not know about the random color allocation.
The solution is to use a given seed for the random number generator. Then the same colors are used for subsequent plotting.
fromnumpy.randomimportdefault_rngrng=default_rng(seed) # uses the PCG64 generatorvals=rng.random((m, n))
When plotting the same grain configuration twice, the displayed colors are different because colors are randomly allocated to each grain. This is not only annoying when making comparisons, but it can also deceive people who do not know about the random color allocation.
The solution is to use a given seed for the random number generator. Then the same colors are used for subsequent plotting.
See also #9.
Implement it in the analysis module as
show_label_image
.The text was updated successfully, but these errors were encountered: