Coming from using matplotlib, they have many high quality, predefined color schemes. I think it would be helpful to have something similar in MathGL. What do you think about adding color scheme keywords? MathGL could precompute the internal color representation and substitute this, or simply substitute the keyword for a char array containing the color scheme color ids. I think it would make it faster and easier for people to make nicer looking graphs, even if they don't have a great artistic sense.
Maybe the syntax could be {keyword}. When the parser sees there is no comma, it knows it is a keyword rather than color stop. Maybe @keyword or other symbol would be nice, but I see pretty much every special character has already been used up, so maybe that's not possible.
Another idea that could be more forward compatible is adding an alias to the methods for a "Style" struct with methods to set colors/text/lines/etc by keywords. Could use enums in this case as keywords, since no longer limited by char array inputs. Anyways, I'm really just suggesting some way to define plain text names "winter", "jet", "dash", "dot", etc. It wouldn't be possible for all styles, but we could at least cover all the most common ones. It would allow for self-documenting code and make it easier and more appealing for less frequent users of MathGL; they wouldn't have to look up the style symbol docs every time they need to set a style.
Anonymous