-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default Colors for Elements/Orbitals #8
Comments
I suspect it is impossible to develop a colour scheme for all elements which allows the contributions to be easily distinguished in all compounds. The current scheme gives reasonable contrast in my experience; can you show an example where the default behavior is particularly poor? When you say "hard-coding" you are using a .conf file, right? I would encourage users to go with .conf files if they have opinions about colour choice. (As long as we nake sure the defaults are also decent!) I am interested in this issue as I would like to imrove the colour-blindness accessibility; but it is difficult at this point to imagine what a colour-blind-safe quaternary PDOS would look like. Adding markers to the lines could be very effective, but also could become very cluttered. |
Hi @shyamd Thanks for this comment, generating a custom scheme based on the total number of orbits would be nice. Currently, if the orbital is not found in You should only have to create your own config file if you want the colour scheme to be consistent over multiple system with different composition (or you are not happy with the colours in the above list). Unfortunately, due to the large number of elements and orbitals, creating a default colour for all of them would surely result in some colour reuse, which is something we'd like to avoid. |
@utf , Sounds good. I also recently found this: http://tools.medialab.sciences-po.fr/iwanthue/ Which lets you generate a ton of different color palettes with lots of separate hues. Might be a good place to get several sets of different color palettes. Hard coding in 1 to say 24 would more than enough, but you'd want each set to be unique a not just a mishmash of from a standard set of colors. On a side note, I noticed that If I regenerate the plot, say in a notebook, I can get different colors for the DOS. Might this be a caching issue with the color picker? |
Also, it might be a good idea to change the Energy Label to something like E-E_f (eV) when zero'ing to the Fermi level. |
The current colour palette is a sequence of 23 colours. If you think the palette needs to be improved, please be more specific about how it is failing so that we can consider our options; examples would be helpful. In my opinion this kind of line plot becomes difficult to interpret when there are more than four lines, so while there is room for improvement I would like to look further than merely tweaking colours. I can reproduce the regeneration issue and see how that would be annoying. It is a result of the way the colour sequence is implemented as a I have moved the energy label discussion to a new Issue. |
It might be a good idea to move the color cycle into the DOS Plotter object and have subplots grab it to enumerate forward. This will ensure consistency. I should be able to run plot over and over again and get the same plot. |
That only works if the subplots are all generated by the same DOS plotter.
I agree that this should be possible, but I am not convinced that it should replace the existing behaviour. Repeatedly calling the DOS plotter from a script is a likely use-case. What I would really like would be if Sumo remembered which colours it had assigned to which elements and orbitals, so that calling it on say NaCl followed by KCl would give consistent colouring for the chlorine and pick different colours for the alkali metals. I think that would suit both cases? |
Yeah that would be a good compromise. |
This has been addressed in #10. |
It would be really nice if there was a default color scheme for all elements, or could auto generate something based on the total number of elements/orbitals. Right now, I'm just hard-coding in color brewer color sets for X number of elements.
The text was updated successfully, but these errors were encountered: