legend Questions
4
Solved
So far I have been able to label the subplots just fine but I'm having an issue with the main one.
Here's the relevant part of my code:
data_BS_P = data[channels[0]]
data_BS_R = data[channels[1]]...
Delaryd asked 12/4, 2014 at 23:53
2
Solved
I'm trying to combine alpha and fill aesthetics. It works when I'm using geom_bar (or geom_points, for color), but the alpha legend doesn't work in when I'm using geom_boxplot.
library(data.table)
...
5
Solved
I plot a 2 geom_point graph with the following code:
source("http://www.openintro.org/stat/data/arbuthnot.R")
library(ggplot2)
ggplot() +
geom_point(aes(x = year,y = boys),data=arbuthnot,colour =...
Hayashi asked 18/7, 2013 at 3:18
3
Solved
I am trying to customize the order of legends while plotting stacked bar plots in plotly,python.
data = [
go.Bar(
y=df['sid'], # assign x as the dataframe column 'x'
x=df['A'],
orientation='h'...
Hypomania asked 28/6, 2019 at 14:24
8
I have a Plotly chart with a colorbar legend.
I'd like this to go from 0 to 100 with the ticks set every 10.
No matter how I try, the chart always starts the ticks at 10 and ends at 90, removing my...
5
Solved
I'm making a scatter plot which looks like this:
(MWE at bottom of question)
As can be seen in the image above the colors of the points in the legend are set to blue automatically by matplotlib...
Diseur asked 16/5, 2014 at 15:15
2
Solved
I'm binning data and plotting it on a map with a legend for each bin, but I get a line in my legend for each time I go through the loop. How can I just get one line in my legend for each binned cat...
Discontented asked 10/12, 2015 at 21:50
1
i'm trying to change cursor from pointer to default when hover event occurred on plotly's graph legend
legend: {
cursor: "default",
x: xLegenda,
y: yLegenda,
orientation: "h",
font: {
size:...
Warmonger asked 22/1, 2019 at 10:59
3
Solved
I am interested in plotting a legend in my scatterplot. My current code looks like this
x=[1,2,3,4]
y=[5,6,7,8]
classes = [2,4,4,2]
plt.scatter(x, y, c=classes, label=classes)
plt.legend()
The pro...
Paleface asked 5/2, 2017 at 20:8
9
I’d like to include a legend or key in my GraphViz diagram. I’m having trouble figuring out what code to use, though. I also want to put it in a corner, but the only coord I know for sure is the bo...
3
Solved
I am creating a heat map using ggplot(), and would like to utilize the 3 color scheme of scale_fill_gradient2(). I've found, however that the middle color is too broad and tends to display some of ...
3
Solved
Is it possible to put multiple "titles" in a legend in matplotlib?
What I want is something like:
Title 1
x label 1
o label2
Title 2
^ label 3
v label 4
...
in case I have 4 curves or more. Be...
Ossifrage asked 16/7, 2014 at 17:26
7
Solved
I have a plot with a horizontal legend:
legend("bottomleft", inset = c(0, -0.3), bty = "n",
x.intersp=0, xjust=0,yjust=0,
legend=c("AAPL", "Information Technology",
"Technology Hardware and Eq...
5
Solved
I use the following code to plot the bar graph and need to present a legend in reverse order. How can I do it?
colorsArr = plt.cm.BuPu(np.linspace(0, 0.5, len(C2)))
p = numpy.empty(len(C2), dtype=o...
Woodchuck asked 3/1, 2016 at 11:34
18
Solved
I have a series of 20 plots (not subplots) to be made in a single figure. I want the legend to be outside of the box. At the same time, I do not want to change the axes, as the size of the figure g...
Breadwinner asked 15/1, 2011 at 16:10
3
Solved
I don't quite understand why the legend disappeared when I converted a plot made by ggplot to plotly using ggplotly. The plotly help page did not have any information. I don't think their examples ...
6
Solved
I'm plotting some data curves with gnuplot, and they look like this:
However, the line samples in the legend are too thin. When you have more curves, it becomes hard to distinguish the colors. Y...
Trenttrento asked 15/6, 2012 at 21:51
11
Solved
I have a plot with two y-axes, using twinx(). I also give labels to the lines, and want to show them with legend(), but I only succeed to get the labels of one axis in the legend:
import numpy as ...
Aida asked 30/3, 2011 at 10:10
4
Solved
I am trying to plot some data with confidence bands. I am doing this with two plots for each data stream: plot, and fill_between. I would like the legend to look similar to the plots, where each en...
Areola asked 26/2, 2015 at 1:16
1
I am using R to generate a Quarto document with figures and tables. This document should be rendered to create both an HTML and a PDF file. Most of it works just fine. However, I have figures with ...
8
Solved
I use this in visual studio but the compiler claimed that h1 cannot be nested in legend element, but browser can render it anyway so i am confused that this is valid or not?
<fieldset>
<...
7
Solved
I am having to reorder items in a legend, when I don't think I should have to. I try:
from pylab import *
clf()
ax=gca()
ht=ax.add_patch(Rectangle((1,1),1,1,color='r',label='Top',alpha=.1))
h1=ax.b...
Nanji asked 8/3, 2014 at 1:29
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 ...
3
Solved
I am using seaborn scatterplot and countplot on titanic dataset.
Here is my code to draw scatter plot. I also tried to edit legend label.
ax = seaborn.countplot(x='class', hue='who', data=titanic)...
Prowel asked 22/2, 2020 at 9:32
5
Solved
I use a relplot with different hue and style and would like to show the respective legend entries besides instead of below each other.
So currently I get a legend like this:
Instead I would lik...
Saragossa asked 13/6, 2019 at 7:50
© 2022 - 2025 — McMap. All rights reserved.