Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
39 views

Legend has one entry for every combination of two parameters -- how can I simplify the legend?

I have a pandas scatterplot with two parameters: type of intervention (ventilation, filtration, source control, or combination) and type of benefit (health, productivity, or both). Right now the ...
ZHoskin's user avatar
0 votes
0 answers
40 views

Why `cowplot` is not extracting the legend?

We have a data set like this x = c(0, 0, 0, 1, 1, 1, 2, 2, 2) y = c("s", "n", "f", "s", "n", "f", "s", "n", "f"...
Vultra Uiolet's user avatar
0 votes
2 answers
61 views

Edit legend of seaborn stacked barplot

I followed this tutorial to create a stacked double barplot, which worked nicely for my data, but now I'm trying to edit the legend to include the information needed to read the figure. I tried ...
Whitehot's user avatar
  • 487
0 votes
1 answer
31 views

Showing a legend in a faceted plot with both bars and points

My legend is overlaying the point on the legend entries for the bars. I don't want the dots in my legend entries for "Shoot 1", etc. This answer partially fixed my problem, although I think ...
Jordan Woolfrey's user avatar
1 vote
1 answer
20 views

Changing legend behavior from strikethrough to color change

As I've found strikethrough to be very annoying as it obscures the text so it's sometimes difficult to tell what the legend label is when hidden, I wanted to change the behavior and so that, instead ...
AckItsMe's user avatar
0 votes
0 answers
34 views

How to capture clicked legends in Plotly?

I created a radar chart that displays data called zones. I am not able to make a callback function that returns the legends visible currently by user's action on the legend. When user deselects legend ...
Sree's user avatar
  • 1
0 votes
0 answers
28 views

How to italicise a specfic part of a legend text in ggplot? [duplicate]

I want to italicise in the legend the Species name in "Rescued Species" and "Wild Species". How can I achieve it? I have looked at ggtext and glue packages but I am not seeing how ...
JPM's user avatar
  • 19
0 votes
0 answers
20 views

How to use apply legend items to change item order using System.Windows.Forms.DataVisualization.Charting

I have a graph that I have at least 3 chart series in it. When I had a 4rth, 5th or 6th series to it; I want two of the chart series to be changed in order. Here is the documentation for the object: ...
Daniel Levenson's user avatar
1 vote
1 answer
27 views

Adding an average line to a gradient legend

I would like to add a line to a legend gradient bar. That's how my legend looks: enter image description here What I want is this: enter image description here My code: main_map <- ggplot() + ...
Niklas H.'s user avatar
0 votes
0 answers
32 views

Legend not showing up using Matplotlib [duplicate]

I have been trying to add a legend to my graph, but it keeps showing up as just a small empty box, and I don't know how to fix this. Here is my code: plot.figure(figureLabel) plot.title(...
Greggs's user avatar
  • 19
0 votes
1 answer
68 views

Problem in ggplot2 with color and shape variables combining into a concatenated legend [closed]

So I have a plot which I'm trying to have the points colored by type1 and the shape shaped by note1 etc. For some reason, the plot is concatenating the dang things into a key like this: type1 note1 - -...
SqueakyBeak's user avatar
0 votes
1 answer
18 views

How to change legedn text charts to custom text arabic?

I work on crystal report I face issue I can't change text legend to Arabic text so how to fix that issue please ? so legend text beside color i need to change to custom text Arabic . Exactly I make ...
ahmed salah abd elaziz elbarba's user avatar
0 votes
1 answer
39 views

Problem with symbol opacity of errorbar within legend

I'm trying to indicate perfectly symbols within legend once I want to plot complicated combinations of line and errorbar in grid plots. I noticed that it's not easy to apply desired opacity for any ...
Mario's user avatar
  • 1,960
1 vote
2 answers
65 views

Use expression() inside a matrix to create a legend in R

In an experiment I am running, the plot legend is created as follows: eigenvalues <- t(c(1,2)) plot(1) # Legend legend_text <- cbind( paste("λ1 =", eigenvalues[, 1]), paste("...
Saïd Maanan's user avatar
2 votes
1 answer
45 views

Why doesn't scale_shape_manual behave in the same way as scale_color_manual and scale_fill_manual?

Say I have a data frame like myiris below, where I want to just highlight the setosa species. I don't want, however, the other species to show in the legend. For my convenience, I just made all the ...
DaniCee's user avatar
  • 3,197
2 votes
1 answer
57 views

R: Reduce space between columns in legend

I use the following R command to create a legend for my plot: legend("topright", legend = c("", "T = 500", "T = 1000", "T = 2000", ...
Saïd Maanan's user avatar
0 votes
1 answer
23 views

ggplot: force unused guide to display

I am developing a general plot function. I want to annotate this plot with a large block of text (info). However, since my plots may have 1 or many facet rows/columns, using labs(tag=info), geom_text ...
jessexknight's user avatar
2 votes
1 answer
67 views

Add additional legend to ggplot without extra packages

I have a ggplot with two sets of points for different subjects (x-axis) connected by lines. A legend is generated for them. Then I want to add a transformation of the points for each subject, such as ...
PM.'s user avatar
  • 726
0 votes
0 answers
19 views

Plot legend isn't displaying the color of the individual lines

The following is not the use case I actually need, but it serves as a perfectly fine example. When I try to run the following code I get the legend, but the legend appears without the corresponding ...
Ellie Williamson's user avatar
0 votes
1 answer
14 views

MPAndroidChart phantom legend over landscape legend

I am using MPAndroidChart to chart weather data. The app supports both portrait and landscape modes. The legend looks fine in portrait mode, however in landscape more there appears to be white text, ...
Dave Enstrom's user avatar
1 vote
1 answer
46 views

Hide certain legend items by axis in geom_parallel_set plot

I would like to hide certain parts of the legend of the plot below by axis. In other words, suppress legend items for either the "Class", "Sex", "Age", and "Survived&...
Nick's user avatar
  • 13
0 votes
0 answers
17 views

AmChart Pie Chart legend shouldn't be clickable but must allow hover

I am using AmChart's Pie Chart to display some categorical data. I also use a legend in order to allow users to see this chart's values when hovered over. When this legend's items are clicked it ...
alalackck's user avatar
0 votes
1 answer
31 views

Seaborn legend not matching with plot lines [duplicate]

I have the following code: import pandas as pd import seaborn as sns import matplotlib.pyplot as plt v_exponents = range(2, 9) vs = [2 ** exponent - 1 for exponent in v_exponents] df = pd.read_csv('...
Paul Reiners's user avatar
  • 7,856
0 votes
1 answer
61 views

Adding manual legend for GGplot with calculated values

First reprex for me here. Couldn't add library(ggplot); hope thats fine. I created a Bandman-Altman Plot. Now I would like to have the calculated numbers from Mean, Sd, Upper and Lower-Limits written ...
Phil's user avatar
  • 13
0 votes
0 answers
25 views

Is there a way to merge these two snsplots into one?

I am not an expert in seaborn. I have created these two catplots and I want to know if there is a way to merge them in one. An easy way would be to create a new column in my data for (model+method) ...
wafaa's user avatar
  • 31
0 votes
0 answers
128 views

Add legend in pyvis

I have python code to draw a graph with nodes ('A','B','C','D','E') but i am not able to add a legend: I want a legend with the 3 colors, such as "lightblue" = descrpt1, "lightgreen&...
d_k's user avatar
  • 25
0 votes
1 answer
41 views

How to change line height in legend?

How to change line height in legend ? In geom_line(size=2) ,change size can change line height both in plot and legend , how to change only legend line size ? library(tidyverse) plot_data <- data....
anderwyang's user avatar
  • 2,381
0 votes
0 answers
40 views

How to group legend labels in customized order with python plotly iplot?

I'm using plotly iplot for a butterfly plot, with a couple of dozen traces, I would like to group the legend labels in customized order, wonder anyone know how to do it. I did find examples of ...
Polygon's user avatar
1 vote
1 answer
37 views

Plotly: associate a trace to multiple legendgroup

I'm using plotly and python 3.9 to display traces on a plot. My figure have multiple subplots: fig = make_subplots(rows=numberOfRows, cols=1, horizontal_spacing = 0.04, ...
chang thenoob's user avatar
0 votes
0 answers
12 views

How can I show a place on map by clicking its name in the Legend or List in WordPress?

In WordPress website I have a map and I need to show (highlight) 4 places once user click/or hover mouse on the name of the place in the legend or list on one side. I searched plugins but nothing ...
Khalid Masood's user avatar
1 vote
1 answer
32 views

How can I use the d3.join method to create a clickable/interactive legend?

I am trying to create a clickable legend functionality in D3 version 7, using the .join() method. My legend buttons are working and transmitting information correctly. However, there is something ...
amunnelly's user avatar
  • 1,196
0 votes
0 answers
32 views

Customize PieChartSectionData title with different styles

I have a pie chart visualisation, and I want to customize its sections. Specifically, I want fund.name to be in FontWeight.bold, and fund.amount.toStringAsFixed(2) to be in green. But I do not know ...
salomepx's user avatar
0 votes
0 answers
56 views

Positioning specific ngx-slider legends in different positions

I'm using ngx-slider, and say I have two legends on the first and last values, like so: sliderOptionsTP1 { floor: 0, ceil: 10, showTicks: true, stepsArray: [ { value: ...
not_castillo's user avatar
1 vote
0 answers
41 views

Gganimate with ggplot: legend is not shown [closed]

So I have this script and the animation just works fine, but I can not get the legend/guide. With the static map the legend appears automatically. Here is the code for the animated plot: alapadatok &...
András Takács's user avatar
0 votes
1 answer
57 views

Scatter plot legend with colors for a string attribute in complex dataframe using Matplotlib (Python)

I have a dataframe with thousands of depth values (y) and associated porosity values (x) and layer name (layer). I've created a scatter plot of the y and x values and want to color the symbols by ...
Dave's user avatar
  • 65
3 votes
2 answers
62 views

Change * to U00D7 multiplication symbol (×) in MATLAB with code

I am using MATLAB's fitlm function to analyse some test data, and then plotting the "raw output" as per the documentation. (matlab fitlm doc) This plot(mdl) has an automatically generated ...
user2587726's user avatar
0 votes
1 answer
37 views

I'm trying to exert more control on the legends for a plot (ggplot2) with two y-axes

I would like the top legend to not have the points. That legend is for the stacked barplot (percentage of total funding) and should just show the category color. I would like the bottom legend to show ...
abalter's user avatar
  • 10.3k
0 votes
1 answer
42 views

Avoid combined legends associated with different but grouped datasets

I am creating a scatter plot using ggplot2 with three groups. I am then adding an additional layer to plot additional data. In both cases, I map the data to group, but in the second case I want to ...
rempsyc's user avatar
  • 1,018
1 vote
1 answer
31 views

R ChromoMap: Displaying legend and scatter plot y-axis

I am currently plotting a figure using the ChromoMap package in R. I am wondering whether there is a way to display the y-axis of the scatter plots using scientific notation (i.e. 0.0005 -> 5e-4). ...
Karina Guo's user avatar
1 vote
0 answers
45 views

When a certain range of values ​does not exist in the original data, how can it be displayed in the legend? [duplicate]

I tried to present some ranges of values not existing in my original data in the legend of output figure, but only the text showed up without color and size. Here is my original data: merged_data<-...
Nightowl's user avatar
1 vote
2 answers
77 views

How to remove legend.key background box in second legend guide in ggplot

I have two y axes in a plot and legends to go with each. The right axis for the point is in the plot and the accompanying legend titled "I" here. In the code, it's the scale_color_manual or ...
John Polo's user avatar
  • 802
0 votes
1 answer
20 views

How to graph points connected by line for known values, and smooth curves for predicted values using ggplot with legend

I have 8 different equations for predictive curves, but included a shortened version of the csv I am working with here: Nb_fires <- c(1,2,3,4,5,6,7,9,11,13,17,20,36) freq <- c(10,3,4,4,6,1,4,1,4,...
m0ssyb00ts's user avatar
0 votes
1 answer
62 views

How can I change the individual values to a range of values in the legend when plotting the world map?

I want to adjust the legend from the single values to value ranges, and also combine the color and size together. My code is as follows: library(ggplot2) library(dplyr) library(sf) library(...
Nightowl's user avatar
1 vote
0 answers
57 views

SSRS Chart paged Legend Key only appears first time

I have a report in SSRS (created in VS), it has a Chart with series as bars. The chart is paged on groupings. However, the legend only shows the keys which appear on the current page when that key ...
stan4th's user avatar
  • 670
1 vote
1 answer
62 views

How to fix the value of a specific color of Legend?

I try to use two sets of data Data1 and Data2 to draw the yield (median_mafruit) in the same area. I want to fix the colors between different value areas for legend. My code is as follows: library(...
Nightowl's user avatar
0 votes
0 answers
53 views

R circlize add custom Y axis labels

I have a data set looking at frequencies of 57 attributes selected by a panel to describe a the same sample. I've trimmed the data to the first four selections made and want to plot it as a wheel. I'...
SmallyMally's user avatar
1 vote
1 answer
71 views

How can I make two legends in a MATLAB figure the same size and adjust the legend marker size appropriately?

From the figure below, the following two issues are observed: Legend font size inconsistency: Although both Legend 1 and Legend 2 are set to font size 6, they appear to display at different sizes. ...
Lucy Yang's user avatar
1 vote
1 answer
73 views

How to get legend box to show up

Say that I create a choropleth map of NC using this code: library(ggplot2) library(sf) nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE) b <- ...
bill999's user avatar
  • 2,529
1 vote
0 answers
18 views

Can I override Highcharts legend auto changing?

I have a highchart graph (codebase is react) with the following legend layout: But when the screen gets small enough, it auto flips to be: I have tried adding "layout: 'horizontal'" in ...
PaulJeffreys1974's user avatar
0 votes
1 answer
38 views

Localization. Chart legend text does not change when language is changed

Localization of chart legend texts does not work in my app. Obviously I am doing something wrong. Here is the code: Chart { ForEach(morningTemp) { item in LineMark( x: .value(&...
karlmz's user avatar
  • 27

1
2 3 4 5
104