Replies: 1 comment 2 replies
-
Thanks @mmcky , very helpful! I like the idea of adding a colormap to QuantEcon. To clarify your suggestion, we would assign suitable names to the colors in
that are close to the actual colors in that sequence and also easy to remember, such as ax.plot(x, y, color=qe.blue)
ax.plot(x, z, color=qe.orange) and so on. Is that the idea? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Reading QuantEcon lectures is so rewarding in part because they are high quality and they adopt a style that is consistent across lectures. This discussion is to capture some ideas on how we can make colour choices in figures and plotting more consistent across lectures.
Option 1: Select colours like
matplotlib
selects colours from default colour cyclerOne option to improve consistency is to adopt colours for charts in the same way that
matplotlib
chooses colours from the default colour cycler. This would mean that (in many cases) we can leave figure generation as simple as possible and letmatplotlib
choose colours. However in some cases this is not always possible due to the ordering of content, so following this selection cycle and setting these colours manually in this case would still improve consistency.The main issues are:
produces the following colours
they are not simple colour names so using them will complicate the code
These are the colours
Idea: We could define a colour map for QuantEcon (that is similar to these colours using
simple
colour tables such asgreen
,blue
as close as possible to thematplotlib
colours)Option 2:
We could specify a configuration dict at the top of the lecture to centralise parameters such as these (to make it easier to harmonise across lectures)
then it would be used as
but that is not as simple to read as
Beta Was this translation helpful? Give feedback.
All reactions