About 258,000 results
Open links in new tab
  1. python - matplotlib: colorbars and its text labels - Stack Overflow

    This will make you add label and change colorbar's tick and label size: clb=plt.colorbar() clb.ax.tick_params(labelsize=8) clb.ax.set_title('Your Label',fontsize=8) This can be also used if you have sublots:

  2. matplotlib.pyplot.colorbar — Matplotlib 3.10.1 documentation

    Whether to draw lines at color boundaries. The label on the colorbar's long axis.

  3. Colorbar Tick Labelling — Matplotlib 3.10.1 documentation

    Colorbar Tick Labelling# Vertical colorbars have ticks, tick labels, and labels visible on the y axis, horizontal colorbars on the x axis. The ticks parameter can be used to set the ticks and the format parameter can be used to format the tick labels of the visible colorbar Axes.

  4. Matplotlib.pyplot.colorbar () function in Python - GeeksforGeeks

    Apr 28, 2025 · The matplotlib.pyplot.colorbar() function in Python adds a color scale (color bar) to a plot, helping to interpret the relationship between data values and colors in colormapped plots like imshow(), scatter() or contourf(). Let us see an example to understand this better:

  5. Customized Colorbars Tutorial — Matplotlib 3.10.1 documentation

    Here, we create a basic continuous colorbar with ticks and labels. The arguments to the colorbar call are the ScalarMappable (constructed using the norm and cmap arguments), the axes where the colorbar should be drawn, and the colorbar's orientation.

  6. python - Add a vertical label to matplotlib colormap legend

    Dec 4, 2017 · You are looking to add a label to the colorbar object. Thankfully, colorbar has a set_label function. in short: cbar = plt.colorbar(contour, format=ticker.FuncFormatter(fmt)) cbar.set_label('your label here') In a minimal script:

  7. How to Change Colorbar Labels in Matplotlib - Matplotlib Color

    Sep 10, 2024 · Matplotlib, a powerful plotting library in Python, offers various ways to customize colorbars, including modifying their labels.

  8. python - matplotlib colorbar tick label formatting - Stack Overflow

    3 days ago · Currently the colorbar tick label formatting will use the format string provided earlier: cbar_num_format = "%d", but I'd like to also set the font size and weight using: cbar.ax.set_yticklabels(np.arange(cbar_min, cbar_max+cbar_step, …

  9. Change the label size and tick label size of colorbar using Matplotlib ...

    Nov 5, 2021 · Here we will discuss how to change the label size and tick label size of color-bar, using different examples to make it more clear. Syntax: # Change the label size. im.figure.axes[0].tick_params(axis=”both”, labelsize=21) axis = x, y or both. labelsize = int # Change the tick label size of color-bar

  10. How to change colorbar labels in matplotlib - GeeksforGeeks

    Dec 29, 2021 · In this article, we are going to see how to change color bar labels in matplotlib using Python. The colorbar() function is used to plot the color bar which belongs to the pyplot module of matplotlib adds a colorbar to a plot indicating the color scale.

  11. Some results have been removed