![]() ![]() Yellow_data, green_data, blue_data= np.random.random((3,num)) It is inspired by Joe Kington's answer here and in twinx kills tick label color. It is much shorter than the 16 lines I stated in my question above. This version can color two subplots with axes and in two different colors. Maybe it is a bit crude to answer my own question, but I would like to share what I could find so far. I'm using python 2.6.5 with matplotlib 0.99.1.1 under ubuntu. ![]() Is there an elegant way of condensing the above block, something :-) matplotlib.rc('axes',edgecolor='green')ĭig out the spines of the axis, then change it: also discussed here not really elegant, I think. Please, no discussions about too many colors in plots. I want to have some other plots in different colors. Matplotlib.rc: discussed here changes globally, not locally. So for changing the frame color of two plots with two y-axes each, I would need 16(!) lines of code. This snippet changes the color of the frame of the upper plot: _color('green')įor t in _ticklines(): t.set_color('green')įor t in _ticklines(): t.set_color('green')įor t in _ticklines(): t.set_color('green')įor t in _ticklines(): t.set_color('green') I hope it is alright to open a new, extended question for this.Ĭhanging the color of a complete frame (ticks and axes) around a double-plot (via add_subplot) with axes results in a lot of code. ![]() This is a kind of follow-up question to this post, where the coloring of axes, ticks and labels was discussed. ![]()
0 Comments
Leave a Reply. |