colorbar

Defining new colormap in matplotlib with colors "centered" around integers

Defining new colormap in matplotlib with colors "centered" around integers Question: I’m trying to use a colormap in matplotlib where each color is "localized" about an integer. For example, when the data I am plotting is in the range [-1,1], I want it to be clear which data is around -1, 0, and 1. cmap …

Total answers: 1

Trying to change the colorbar's text colour in a Seaborn Heatmap

Trying to change the colorbar's text colour in a Seaborn Heatmap Question: I have two heatmap subplots using Seaborn (shown below) I have looked for tutorials/help etc everywhere but I cannot figure out: Q) How to change the color of the colorbar numbers on each of the heatmaps? I want them both to be the …

Total answers: 1

How to deal with the colorbar axis space in matplotlib subplots

How to deal with the colorbar axis space in matplotlib subplots Question: I am plotting seven different parameters over four seasons, as shown in below image. but on last column (Post-Monsoon) sub_plots axis compromised with colorbar axis, that is really awkward!! import matplotlib.pyplot as plt import cartopy import cartopy.crs as ccrs from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, …

Total answers: 3

(Python) tkinter figures (with colorbar) overlap when using slider

(Python) tkinter figures (with colorbar) overlap when using slider Question: The following codes is to plot contours from five (slider: 0 ~ 4) .xlsx files on tkinter. Each file just contains numerical data in the matrix 12X6 such as from tkinter import * import tkinter.ttk as ttk import matplotlib import matplotlib.pyplot as plt from matplotlib …

Total answers: 2

How to place a single colorbar for two gridspec subplots

How to place a single colorbar for two gridspec subplots Question: I am trying to plot 6 plots in the form of a grid using gridspec. I want one color bar placed at the bottom between the 2nd and 3rd columns. My code is as follows, but it generates 6 colorbars. How can I change …

Total answers: 1

Hiding values next to seaborn colormap

Hiding values next to seaborn colormap Question: Here’s a picture of the plot I get for a bivariate density. However the numbers next to the colorbar are really not of much use here, and I would like either to delete them or replace by ‘LOW’ and ‘HIGH’. I didn’t find any way of doing this …

Total answers: 1

Python: Plot frequency of negative (x,y) coordinates

Python: Plot frequency of negative (x,y) coordinates Question: I’m trying to plot the frequencies of a 2D-integer random walk starting from (0,0). First, I get a list of (x,y)-coordinates, some of which are negative and I’m having problems plotting them the right way. I know my current attempt is wrong, as (0,0) sometimes look like …

Total answers: 1

How to remove legend from an image plot

How to remove legend from an image plot Question: I am trying to remove the legend of the spectrogram (I am trying to get a 244×244 pixel image) I have tried Remove the legend on a matplotlib figure but it works in a very weird way – I get the result and an exception! (I …

Total answers: 1