5,174
questions
0
votes
0
answers
16
views
Show the marker and the line at the same time at the legend of boxplot [duplicate]
I want to show marker without the line, mean, median line in the legend.
I don't know how to remove the line in the marker
I try to add the handlelength=0. in the legend, but it will remove all the ...
1
vote
1
answer
23
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). ...
1
vote
0
answers
44
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<-...
1
vote
2
answers
48
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 ...
0
votes
1
answer
16
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,...
0
votes
1
answer
54
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(...
0
votes
0
answers
20
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 ...
1
vote
1
answer
54
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(...
0
votes
0
answers
26
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'...
1
vote
1
answer
47
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.
...
1
vote
1
answer
62
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 <- ...
1
vote
0
answers
16
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 ...
0
votes
1
answer
22
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(&...
0
votes
0
answers
23
views
ggplot2 legend.position error in vertexai [duplicate]
I am trying to create plots using ggplot2 but the legend is not showing up. I have tried using the scale_fill_manual() argument but I get an error. Below is a sample of the code with and without the ...
0
votes
0
answers
35
views
Well-spaced color bar labels with short numerical ranges in ggplot2 heat maps [duplicate]
I'm trying to plot a ggplot2 heat map filling it with values that range from 0 to 0.7. I wanted the legend color bar labels to have well-defined spacing, i.e. 0 at the bottom, 0.05 in the middle, and &...
0
votes
1
answer
39
views
Color for unused categorical variable missing from manual scale legend using limits [duplicate]
I would like to make a geom_area plot where the legend shows more colors than there is data for. I've provided a made-up dataset below that has two treatments, and I want the legend to show colors for ...
0
votes
1
answer
57
views
How to get rid of a second legend title in ggplot? [closed]
I am trying to plot a glmer output but I either get two legends or the one without the color (I probably doubled the color coding).Also I am not sure where the dotted line comes from. This is the code ...
0
votes
0
answers
11
views
Why can't I toggle my custom legends on or off in Plotly?
I have a function that creates subplots with multiple axes on each subplot using custom code, as multiple axes are not currently supported. I can't paste all the code here as it is a lot, but, at a ...
0
votes
1
answer
66
views
Text outside the plot; how to add add a paragraph, selectively bold, and save plot with annotations
I am trying to edit text outside a plot, below the legend. I've followed the instructions suggested here and I've been able to put together the following code
p <- ggplot(Amh2, aes(x=syllable, y=...
0
votes
1
answer
25
views
Seaborn - Legend not getting displayed on twinx()
I am trying to plot a data on 2 y-axis by using twinx().
The issue is that the legend on the axis - twinx() is not getting displayed.
the code used for expected result is as below:
df_plot = DF02....
0
votes
0
answers
37
views
How to add colorbar legend on openlayers heatmap?
https://openlayers.org/en/latest/examples/heatmap-earthquakes.html
When I reviewed the API documentation for the HeatmapLayer, I couldn't find any explanation about the legend. While searching for a ...
0
votes
1
answer
27
views
highcharts disable legend interaction
ive seen a couple of solutions that disables the legend click but it does not appear to work - possibly because of highcharts version. here is an example:
Disable-Click on Legend in HighCharts Column ...
1
vote
1
answer
31
views
Add label item to legend similar to geom_label_repel()
I have a plot of species richness that has nine lines. I have labelled each line at the end using geom_label_repel() with the appropriate quadrate number. I want to add in my legend a similar black ...
0
votes
0
answers
17
views
ApexChart timeline distributed legend
I have an ApexChart timeline, setted as distributed, but the legend doesn't want to follow the distribution. How can I set the chart to show the legend for the bars?
chartOptions = {
...
0
votes
1
answer
36
views
Number of bins and labels do not match in matplotlib [duplicate]
I have a customize legend in my matplotlib but for some reason I cannot get the bins and the labels to match. If I add one more label, it starts to complaint that I have to many labels in comparison ...
1
vote
1
answer
56
views
How to change legend key shape for ggtree
I am working with a ggtree plot. Data used is available here and you can pull the phylo tree directly from ggtree.
Load required packages
#load libraries
pacman::p_load(
here,
...
0
votes
0
answers
15
views
Adding new chart series but excluding them from the legend
VBA. I'm trying to edit a chart by adding multiple new series to indicate when certain phases begin at certain times. I've done this by writing code that creates series using x values of the date i.e. ...
1
vote
2
answers
59
views
Add a legend to a voronoi diagram with field values
I try to create a map with a voronoi diagram of some climate stations. I've already created the diagram and also colored the areas in the diagram with a fitting color. Now I want a continuous legend ...
1
vote
2
answers
59
views
function for geom_point to increase the scale_size
LATER EDIT: I finally figured out how to do it. It works with the following code:
legend_size <- c(6,5,4,3,2,1,0,1,2,3,4,5,6)
tt <- data.frame(x = c(27.9656, 27.1704, 26.2128 ,23.5634 ,25.3528 ...
2
votes
1
answer
51
views
R ggplot2 need custom legend to have less values than corresponding line plot values to avoid duplicates
I have data which looks like the following:
library(tidyverse)
library(RColorBrewer)
dat<-tibble(
group = c(rep("Group 1", 10), rep("Group 2", 10), rep("Group 3", ...
0
votes
0
answers
49
views
How to plot the legend with combined_plot (ggplot2)
I created this script to display some environmental impacts for my research.
`legend_plot <- ggplot(data_longGW, aes(x = Crop_cycleGW, y = kg_CO2_eq, fill = Category)) +
geom_bar(stat = "...
2
votes
1
answer
57
views
Legend key color when combining ggOceanMaps and ggspatial
I am trying to combine basemap from ggOceanMaps with geom_spatial_point and having the geom_spatial_point having a new color scale.
When I combine these two, the legend.key background color remains ...
1
vote
1
answer
66
views
Showing or saving only the legend of a plotly figure
Given a plotly figure with traces and a legend, is there a way to only show the legend without any of the plot content?
My use case for this: I'm exporting several images with the same legend. Instead ...
0
votes
0
answers
27
views
How to color the legend labels in ggplot [duplicate]
Using the iris dataset, we can make a boxplot and customise the legend when plotting using ggplot like so:
ggplot(data = iris, aes(x=Species, y=Sepal.Length, fill=Species))+
geom_boxplot()+
...
1
vote
1
answer
41
views
How do I make one legend for all subplots in a sns.histplot without duplicate labels?
I have a dataframe that I'm plotting using sns.histplot to make ~9 subplots. I do not want the figure to have 9 legends. I'd like 1 legend for the entire figure, since most of the legends are ...
1
vote
1
answer
48
views
ggplot of multiple geom_sf datasets gives mismatched legend colours
I am trying to create a ggplot map which includes two simple feature line datasets. I would like the lines to either appear in the same legend, or a separate legend. However the approach I am taking ...
0
votes
1
answer
36
views
Is it possible to count the occurrence number of a custom icon in Leaflet? If yes, how to do it?
Firstly, I'm a beginner, I've learned a lot from you.
I have 5 custom icons defined:
//Awesome icons
var LeafIcon = L.Icon.extend({
options: {
shadowUrl: "markers-shadow.png",
...
1
vote
2
answers
63
views
adjusting the legend in TramineR plots
I am new to using TramineR and I just cannot seem to figure out how to arrange the legend in any of the plot types. The legend keeps being cut off by the plots. I have tried to use the seqlegend ...
0
votes
0
answers
30
views
Having problem adding legend onto my ggplot when ggplot's data argument is NULL [duplicate]
New to r here, so please bear with me. I am sure this is something simple to solve. I have this plot here and want to add a legend to distinguish which line represents the "Tailwater Gauge" ...
2
votes
1
answer
42
views
Rotating/angle of ggplot key_glpyh, custom legend key glyph
I am trying to emulate a plot style ive seen online, created by Chris Canipe (https://www.axios.com/2017/12/15/the-flow-of-goods-between-states-1513304375). Looking at trade flows, I've managed to ...
0
votes
1
answer
57
views
Plant UML Multiple legend in Gantt View
How to add Multiple legend with different colors in Gantt Chart using Plant UML?
It's working for me, for one legned. It's taking the last line of code...
Is there a way to show, different parameter ...
1
vote
2
answers
48
views
Altair chart legend for subset of data
As an exercise for learning more advanced altair, I'm trying to generate a simplified version of this chart: https://climatereanalyzer.org/clim/t2_daily/?dm_id=world.
To simplify, I'm using gray for ...
1
vote
1
answer
36
views
R Customize ggVennDigram legend based on internally defined categories of mapped colors - not counts nor individual intersections
First time posting here...
I have a Venn diagram where I have coded certain regions of intersections based on internally defined categories. I want to produce a legend that reflects those categories.
...
1
vote
0
answers
41
views
Text shifted in legend because of LaTeX formatting in matplotlib
For some reason in my subplot, the legend of the second ax is cropped at the bottom inside of the legend box. It seems the index causes the text to shift a bit.
The legend box itself is perfectly fine....
0
votes
1
answer
39
views
Trying to remove the background of color icon in ggplot legend
I'm trying to remove the gray box behind the color icon in the legend of this graph. Wondering if the issue is that I'm using geom_col() so the color aesthetic is just the outline of the column. Does ...
0
votes
1
answer
126
views
Add size legend to plotly.express.scatter_mapbox
I have a visualization done using plotly.express.scatter_mapbox. It basically shows the different institutions on the Saudi Arabia map. These institutions are marked by small circles that are color ...
1
vote
0
answers
42
views
How to add a FancyBbox as a legend?
As per the title, I'm trying to add a list of fancy bboxes to a legend : https://matplotlib.org/stable/gallery/shapes_and_collections/fancybox_demo.html.
I tried the code below but there is a problem. ...
0
votes
1
answer
52
views
How to make responsive 'legend' area for mobile view
I'm building a portfolio website using HTML & CSS. I want to add my projects inside tags. But those legend tags arn't responsive for the screen resolution(for me, it's mobile view) and its' ...
0
votes
0
answers
35
views
How to keep decimal places in branca colormap using folium?
I'm using branca to create a custom color map to use in a folium map. I would like for the scale to display the decimal places from the index still, not round to a whole numbers, but I'm having a hard ...
0
votes
1
answer
52
views
Reorder legend levels in CalendR
Using CalendR to plot fishing days for boats. How do you go about reordering legend levels e.g. boat names first then public holidays last?
Load packages, create events & plot calander:
## load ...