Closed ijpulidos closed 4 years ago
That would be great - would improve pylustrator's output readibility a lot. When changing fontsize of both x and y ticklabels I get a wall of 18 lines of code, which could be 3 -4.
Ok, I fixed this my setting the font properties directly in set_xticklabels. This makes it easier as the for loop in the generated code would make it more difficult when parsing in the automatically generated code (it needs to be parsed by pylustrator to know which changes where from pylustrator and which from the original code).
For changing ticks label font size pylustrator is currently doing it manually tick by tick. For example if I want to change the tick font size to 14 and there are 8 ticks, I get something like the following:
I think this could be done programatically by looping through
plt.figure(1).axes[0].get_xaxis().get_major_ticks()
directly, then you can use the same pylustrator autogenerated code in many figures without having to manually edit the number of ticks by adding or removing lines. For example something like:should do it.