colormap Questions
4
Solved
I created a script that reads and plots .txt files and their content (numbers/values). Each .txt file is located in a different folder. Each folder, in turn, represents one subject from which the d...
Hashimoto asked 28/11, 2021 at 11:29
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
3
Solved
I am trying to extract discrete colors from a matplotlib colormap by manipulating this example. However, I cannot find the N discrete colors that are extracted from the colormap.
In the code below...
Pesticide asked 8/11, 2015 at 16:57
11
Solved
I want to set the middle point of a colormap, i.e., my data goes from -5 to 10 and I want zero to be the middle point. I think the way to do it is by subclassing normalize and using the norm, but I...
Biocellate asked 13/9, 2011 at 15:4
2
Solved
I would like to use a diverging colormap to color the background of a pandas dataframe. The aspect that makes this trickier than one would think is the centering. In the example below, a red to blu...
Decurrent asked 4/1, 2020 at 3:19
2
I have 2-d fields to plot in python using matplotlib basemap.
The values of the fields varies from 0 to more than 1000. Is it possible to create manual colormap with fixed gradations and colours? ...
Canaster asked 26/8, 2014 at 12:54
8
Solved
I'd like to NOT specify a color for each plotted line, and have each line get a distinct color. But if I run:
from matplotlib import pyplot as plt
for i in range(20):
plt.plot([0, 1], [i, i])
pl...
Manas asked 11/2, 2011 at 16:5
3
Solved
I need to change the colors of the boxplot drawn using pandas utility function. I can change most properties using the color argument but can't figure out how to change the facecolor of the box. So...
Tophole asked 2/9, 2016 at 16:32
3
Solved
I am an advocate of using perceptually uniform colormaps when plotting scientific data as grayscale images and applying false colorings. I don't know who invented these, but these colormaps are fan...
Smallsword asked 28/4, 2020 at 18:10
5
I am plotting multiple lines on a single plot and I want them to run through the spectrum of a colormap, not just the same 6 or 7 colors. The code is akin to this:
for i in range(20):
for k in ra...
Sorry asked 5/7, 2016 at 16:49
2
2
Solved
The matplotlib documentation explain in detail how to normalize colormaps for a pcolormesh, but how can I correctly do it for a scatter plot?
normalize = mcolors.Normalize(vmin=-1, vmax=1)
plt.sca...
Griggs asked 31/3, 2017 at 4:9
3
I want to make a colormap with many (in the order of hundreds) unique colors.
This code:
custom_palette = sns.color_palette("Paired", 12)
sns.palplot(custom_palette)
returns a palplot wi...
7
Solved
I am writing a GUI that would benefit from a user-selection of colormaps by name. However, I am at a bit of a quandary in that I can't seem to programmatically get a list of supported colormap name...
Amieva asked 11/5, 2016 at 14:1
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
1
Running the following example from seaborn docs with argument palette='jet'
import seaborn as sns
tips = sns.load_dataset("tips")
ax = sns.boxplot(x="day", y="total_bill&qu...
Character asked 8/4, 2021 at 17:12
2
Solved
I am trying to draw an animated map using plotly_express.
here is a sample code
import plotly.express as px
gapminder = px.data.gapminder()
fig = px.choropleth(gapminder, locations="iso_alpha",
...
2
Solved
Instead of a plotting a colorbar next to my plot, I want to plot a small rectangle filled with the colormap as a legend.
I already can plot a small rectangle filled with any color, by doing the fo...
Maud asked 20/7, 2016 at 18:37
6
Solved
I'm looking for a good circular/cyclic colormap to represent phase angle information (where the values are restricted to the range [0, 2π] and where 0 and 2π represent the same phase angle).
Backg...
Irmairme asked 17/5, 2014 at 14:2
1
I am trying to achieve waterfall graph of wav file. In my attempts I noticed that this is basically a spectogram in 3d (or as close to what I need). I am trying to do this in Python with numpy and ...
Equine asked 3/2, 2018 at 15:13
2
Solved
I’d like to employ the reverse Spectral colormap ,
https://matplotlib.org/examples/color/colormaps_reference.html
for a lineplot.
This works fine with a hex bin plot::
color_map = plt.cm.Spec...
Bismarck asked 19/9, 2017 at 9:14
1
Solved
Consider the following:
import matplotlib.pyplot as plt
from matplotlib import cm
import numpy as np
y = np.array([1, 4, 3, 2, 7, 11])
colors = cm.hsv(y / float(max(y)))
plot = plt.scatter(y, y, c...
Lorinalorinda asked 19/10, 2020 at 16:18
1
Solved
I'm a geology master's student working on my dissertation with a focus on the Sulfur Dioxide output of a number of volcanoes in the South Pacific. I have a little experience with R but my superviso...
Suited asked 13/7, 2020 at 21:1
2
Solved
In matplotlib the scatterplot offers the possibility of using the color of a plot to indicate value or magnitude like this plot:
For bokeh, similar examples seem to manually generate the rgb col...
Soler asked 10/2, 2016 at 12:25
1
I need to create a 'heatmap' or 'colormap' in python. I have three python list, namely: X_COORDINATE, Z_COORDINATE and C_I. The X_COORDINATE and Z_COORDINATE lists contain the x and z coordinates t...
Desirous asked 22/6, 2020 at 20:22
1 Next >
© 2022 - 2025 — McMap. All rights reserved.