Skip to main content

All Questions

Tagged with
0 votes
1 answer
62 views

Modify legend color of a matplotlib plot created by gluonts

I'm using gluonts and plotting a forecast (code from DeepVaR notebook). The code is the following: def plot_prob_forecasts(ts_entry, forecast_entry, asset_name, plot_length=20): ...
Andrea Dalseno's user avatar
2 votes
1 answer
243 views

Is there an alternate for 'palette' while plotting barplot through seaborn object Plot(); How to remove legend when plotting with so.Plot()

I am trying to learn the seaborn object Plot() interface. With the traditional sns.barplot() we could easily define color palette for the bars. import seaborn as sns df = sns.load_dataset('penguins') ...
Satyaranjan Sahoo's user avatar
0 votes
1 answer
38 views

Custom colored lines in matplotlib but legend won't update

I am trying to plot lines out of a pandas dataframe, a pivot table of my data. There's 12 lines, one for each month of the year, and I don't want any duplicate colors. So I decided to set the colors ...
user21551428's user avatar
0 votes
1 answer
62 views

Is there a way to set the color of plotly legend items?

I want to visualize multiple boolean arrays using Scatter traces with timestamps as x and the array-index as y. The values should be visualized using the colors. However, what I do not like is that ...
KrawallKurt's user avatar
3 votes
4 answers
419 views

How to change background color of the title of legend

In the example below, how can I change the background color of "Title" to be red (with alpha=.5), not the font color of "Title"? import matplotlib.pyplot as plt fig, ax = plt....
jII's user avatar
  • 1,155
3 votes
1 answer
5k views

Add two legends in the same plot

I've a x and y. Both are flattened 2D arrays. I've two similar arrays, one for determining the colour of datapoint, another for determining detection method ("transit" or "radial"),...
Pixel_Bear's user avatar
0 votes
0 answers
456 views

Easy issue : Display legend in plots based on a color dictionary python

My problem is simple but I can't fix it. I want to display a legend : Based on my dictionary "color_dict" which defines colors, variables All in red and AML in blue, I want to display a ...
bony's user avatar
  • 1
1 vote
3 answers
3k views

Matplotlib Legend colors change when changing legend labels

I don't understand what I am doing wrong here. I want to change 0 and 1 in the legend to "zero" and "one" but somehow this changes colour in the legend as well. This is how I get ...
JonnDough's user avatar
  • 887
2 votes
1 answer
3k views

Change shape color in an Altair legend

Consider the following code adapted from Altair website. import altair as alt import pandas as pd source = pd.DataFrame({ 'a': ['A', 'B', 'B', 'B', 'E', 'F', 'G', 'H', 'I'], 'b': [28, 55, 43, ...
Alina V's user avatar
  • 119
0 votes
1 answer
1k views

Matplotlib Scatter Plot Legend Creation Mystery

I have the following snipped of code (values for c, s, x, y are mockups, but the real lists follow the same format, just much bigger. Only two colors are used - red and green though. All lists are of ...
John Durand's user avatar
0 votes
1 answer
266 views

matplotlib: same legend for two data sets

I am plotting two datasets in dataframes using matplotlib. The datasets are represented by different line styles. The following is the code. from matplotlib import pyplot as plt import numpy as np ...
Natasha's user avatar
  • 1,431
0 votes
1 answer
168 views

How to Convert Color-Code Legends from Logarithmic Scale to Actual Values?

What is the best way to display actual vallues in color-code legend when using logarithmic scale color coding in plotly.figure_factory.create_choropleth? Here is the sample code: import plotly....
Rotail's user avatar
  • 1,061
6 votes
1 answer
20k views

How to change color of text in plotly scatter and different marker?

I want use plot.ly to plot iris dataset. It has an color parameter in scatter data work like hue in seabron but it only change the color of marker and cant change the color of text and i cant find any ...
Tavakoli's user avatar
  • 1,365
0 votes
1 answer
822 views

is there a way to link color point to a dictionary with the different legend?

I want to bind label to color after doing the scatter plot and the colorization, is there a way to get the colors as arg, set a legend to each color and, if the color is in the plot, add the legend/...
Lemaire damien's user avatar
1 vote
1 answer
937 views

XlsxWriter - Chart Column and Legend Color Mismatch

I am working withxlsxwriter in python. I have created some charts however the color mismatches. I am trying to set colors as required for my work, however, the legend colors are not matched. I need to ...
T0167's user avatar
  • 175

15 30 50 per page