labels

Label python data points on plot

Label python data points on plot Question: I searched for ages (hours which is like ages) to find the answer to a really annoying (seemingly basic) problem, and because I cant find a question that quite fits the answer I am posting a question and answering it in the hope that it will save someone …

Total answers: 2

How to hide ticks label in python but keep the ticks in place?

How to hide ticks label in python but keep the ticks in place? Question: I want to hide my ticks label on a plot I created, but keep this tick itself (the little marks on the axis). When I try to use what I’ve found here, for example, the entire tick is removed, and not …

Total answers: 4

Python matplotlib decrease size of colorbar labels

Python matplotlib decrease size of colorbar labels Question: I need your help! I have a plotting code which is the following: fig = plt.figure() ax1 = fig.add_subplot(111) imax1 = ax1.imshow(data,interpolation = ‘nearest’, origin = ‘lower’,cmap=cm.jet)#plot cbar = plt.colorbar(imax1, extend=’neither’, spacing=’proportional’, orientation=’vertical’, shrink=0.7, format=”%.0f”) cbar.set_label(r”ET [mm/month]”, size=10) titlestr = “Evapotranspiration in mm/month” plt.title(titlestr) #plt.xlabel(“Longitude”) #plt.ylabel(“Latitude”) imax1.set_clim(0,60) …

Total answers: 2

Creating labels where line appears in matplotlib figure

Creating labels where line appears in matplotlib figure Question: I have a figure created in matplotlib (time-series data) over which are a series of matplotlib.pyplot.axvline lines. I would like to create labels on the plot that appear close to (probably on the RHS of the line and towards the top of the figure) these vertical …

Total answers: 2

matplotlib y-axis label on right side

matplotlib y-axis label on right side Question: Is there a simple way to put the y-axis label on the right-hand side of the plot? I know that this can be done for the tick labels using ax.yaxis.tick_right(), but I would like to know if it can be done for the axis label as well. One …

Total answers: 4

matplotlib matshow labels

matplotlib matshow labels Question: I start using matplotlib a month ago, so I’m still learning. I’m trying to do a heatmap with matshow. My code is the following: data = numpy.array(a).reshape(4, 4) cax = ax.matshow(data, interpolation=’nearest’, cmap=cm.get_cmap(‘PuBu’), norm=LogNorm()) cbar = fig.colorbar(cax) ax.set_xticklabels(alpha) ax.set_yticklabels(alpha) where alpha is a model from django with 4fields: ‘ABC’, ‘DEF’, ‘GHI’, …

Total answers: 2