colorbar Questions

11

Solved

This should be easy but I'm having a hard time with it. Basically, I have a subplot in matplotlib that I'm drawing a hexbin plot in every time a function is called, but every time I call the functi...
Hebron asked 10/3, 2011 at 16:55

4

Solved

In Python, with Matplotlib, how to simply do a scatter plot with transparency (alpha < 1), but with a color bar that represents their color value, but has alpha = 1? Here is what one gets, with...
Equitation asked 18/12, 2010 at 15:44

7

Solved

I have the following code: import matplotlib.pyplot as plt cdict = { 'red' : ( (0.0, 0.25, .25), (0.02, .59, .59), (1., 1., 1.)), 'green': ( (0.0, 0.0, 0.0), (0.02, .45, .45), (1., .97, .97)), ...
Jackshaft asked 30/7, 2010 at 16:4

4

Solved

I'd like to create a colorbar legend for a heatmap, such that the labels are in the center of each discrete color. Example borrowed from here: import matplotlib.pyplot as plt import numpy as np fr...
Koons asked 9/4, 2013 at 17:20

3

Solved

When I plot a matrix with a colorbar, then the colorbar has 10 ticks. Since the colorbar has to be pretty small, the ticklabels overlap. Therefore I want to reduce the number of ticks from 10 to 5....
Bask asked 25/2, 2014 at 10:58

3

Solved

I have a matplotlib plot with a colorbar attached. I want to position the colorbar so that it is horizontal, and underneath my plot. I have almost done this via the following: plt.colorbar(orient...
Credulity asked 9/11, 2012 at 15:9

11

Solved

I cannot get the colorbar on imshow graphs like this one to be the same height as the graph, short of using Photoshop after the fact. How do I get the heights to match?
Natashianatassia asked 12/8, 2013 at 20:6

2

Solved

By default, matplotlib would position colorbar labels alongside the vertical colorbars. What is the best way to force the label to be on top of a colorbar? Currently my solution needs adjusting lab...
Worldly asked 16/11, 2015 at 14:11

2

Solved

I need to set the max value on the seaborn heatmap cbar to 2. I've tried: cbar_kws = { 'ticks' : [0, 2] } sns.heatmap(tiles, robust=True, fmt="f", cmap= 'RdBu_r', cbar_kws = cbar_kws) Bu...
Waldo asked 18/11, 2015 at 12:12

3

Solved

I'd like to change the labels for the colorbar from increasing to decreasing values. When I try to do this via vmin and vmax I get the error message: minvalue must be less than or equal to maxva...
Excitant asked 30/5, 2013 at 1:57

2

Solved

I was wondering how can I simply add a colorbar to my plot. I have to following code, which plots a graph by reading a gml file. I have a set of numbers to assign to the edges as their colors and I...
Nephelometer asked 4/11, 2014 at 15:45

4

Solved

I have generated a simple plot in R that shows the correlation coefficients for a set of data. Currently, the legend colorbar on the right side of the plot is a fraction of the entire plot size. I ...
Guevara asked 6/10, 2013 at 22:53

2

Solved

When using matplotlib with a contour plot, I'm having trouble getting the colorbar to display as I want. I've read through numerous similar examples, but have still not been able to get what I want...
Baribaric asked 29/4, 2011 at 0:28

4

Solved

I'd like to draw a (vertical) colorbar, which has two different scales (corresponding to two different units for the same quantity) on each side. Think Fahrenheit on one side and Celsius on the oth...
Clerkly asked 26/11, 2014 at 14:1

2

Solved

I have a map of Germany, and the coords of a few cities. plot displays the dots properly. I would like to use scatter instead, in order to be able to color the markets with respect to an other vari...
Shum asked 23/1, 2015 at 10:6

4

Solved

I am trying to put a colorbar to my image using matplotlib. The issue comes when I try to force the ticklabels to be written in scientific notation. How can I force the scientific notation (ie, 1x1...
Orientation asked 22/9, 2014 at 21:14

3

Solved

Using Cartopy, I would like to have full control of where my colorbar goes. Usually I do this by getting the current axes position as basis and then create new axes for the colorbar. This works wel...
Resilience asked 4/5, 2015 at 12:33

13

Solved

I've spent entirely too long researching how to get two subplots to share the same y-axis with a single colorbar shared between the two in Matplotlib. What was happening was that when I called th...
Musgrave asked 9/12, 2012 at 2:52

2

Solved

How to reduce the colorbar limit when used with contourf ? The color bound from the graphs itself are well set with "vmin" and "vmax", but the colorbar bounds are not modified. import numpy ...
Contraindicate asked 4/3, 2019 at 9:12

3

I have 2 subplots- 1 scatter and one bar for which I would like a shared x axis. The scatter plot has a color bar. The sharex doesn't seem to work with this as the axis for the two plots do not coi...
Resupine asked 11/10, 2017 at 18:9

2

I made a figure with 3 axes in it. Each axis is a heatmap with the same color bar. I want to only keep the colorbar of the 3rd axis and hide the 1st and 2nd colorbar (but keep the heatmap position ...
Lauro asked 21/5, 2018 at 18:4

6

Solved

I'm rendering some graphics in python with matplotlib, and will include them into a LaTeX paper (using LaTex's nice tabular alignment instead of fiddling with matplotlib's ImageGrid, etc.). I would...
Castor asked 16/5, 2013 at 18:48

3

Solved

I would like to rotate the colorbar tick labels so that they read vertically rather than horizontally. I have tried as many variations as I can think of with cbar.ax.set_xticklabels and cbar.ax.tic...
Jiminez asked 17/8, 2015 at 12:9

3

Solved

I'd like to make an overlay of several hexbin plots, but with builtin colormaps only the last one is visible. I don't want to construct a colormap de novo. How one would add linear alpha to the col...
Palmy asked 19/5, 2016 at 15:8

4

Solved

I am wondering how I can explicitly set the format of a colorbar object in matplotlib Here is an example plotting script: from matplotlib import pyplot from matplotlib.ticker import MultipleLocat...
Scarabaeus asked 1/3, 2016 at 16:49

© 2022 - 2025 — McMap. All rights reserved.