How to increase plt.title font size?

fontsize can be assigned inside dictionary fontdict which provides additional parameters fontweight, verticalalignment , horizontalalignment The below snippet should work plt.title(‘Temperature \n Humidity’, fontdict = {‘fontsize’ : 100})

reducing number of plot ticks

Alternatively, if you want to simply set the number of ticks while allowing matplotlib to position them (currently only with MaxNLocator), there is pyplot.locator_params, You can specify specific axis in this method as mentioned below, default is both:

Why matplotlib does not plot?

It could be a problem with the backend. What is the output of python -c ‘import matplotlib; import matplotlib.pyplot; print(matplotlib.backends.backend)’? If it is the ‘agg’ backend, what you see is the expected behaviour as it is a non-interactive backend that does not show anything to the screen, but work with plt.savefig(…). You should switch to, e.g., … Read more

Create own colormap using matplotlib and plot color scale

There is an illustrative example of how to create custom colormaps here. The docstring is essential for understanding the meaning of cdict. Once you get that under your belt, you might use a cdict like this: Although the cdict format gives you a lot of flexibility, I find for simple gradients its format is rather unintuitive. Here is a utility function … Read more

matplotlib using twinx and twiny together (like twinxy)

If I understand your question right, you want to plot two things on the same axes with no shared axis. There is probably a better way to do this, but you can stack twinx (doc) and twiny (doc) as such Which will give you tick marks on all sides of the plot. ax will plot against the bottom and left, ax_new will plot against the top and right.