Graphing cumulative project: Orion constellation

Hello,

you can find my project under the following link: https://github.com/caropaw/codacademy/blob/master/graphing_cumulativeproject_orion.ipynb

I was wondering if there is a way to customize graphs even more? Is there for example a way to change the font type or size for titles and labels?

Thanks in advance!

HI @java5319203801, congratulations on finshing your project. So far as I’m aware it’s possible to change the font and font size for any text you add to a figure/axis.

In your given code for example when setting the labels,

ax.set_xlabel('X Coordinate', fontsize=5, fontname='Verdana')

If the label has already been created and you wanted to change the text (using set_xlabel() etc. should remove the old label anyway though I belive it redraws a few things unlike the label.set_ methods which might be important on occasion) then the following would work-

ax.xaxis.label.set_fontsize(30)
ax.xaxis.label.set_fontname('Verdana')

There are also methods to change the default font/fontsize (and much more) that matplotlib is using by altering rcParams but I won’t go into detail here. If this is important to you a quick search should provide you with an answer or have a nosey through the docs-
https://matplotlib.org/3.2.1/tutorials/introductory/customizing.html#customizing-with-matplotlibrc-files