Skip to main content

All Questions

1 vote
1 answer
36 views

How can I match the colors of lines and legend entries in ggplot2?

I have a dataframe of some spectra (one x-value, several y-values) and want to plot them in one graph. For this purpose, I want to use ggplot. After some research, I found a way to do so, but I want ...
Excelsior's user avatar
  • 181
0 votes
0 answers
283 views

How to deal with long legend labels when using multiple columns

It is necessary that the legend element can occupy several columns so that the legend does not stretch. It should work at any ncol value. If you increase the length of the word "Some Line", ...
hesoyami's user avatar
0 votes
1 answer
76 views

Related to legends for subplots in plotly

I have created the 4 subplots with the legends showing on right sideWhen I create subplots in plotly , legends are created either in right side or in the bottom of all subplots. But how can I get ...
Rajesh Koyi's user avatar
0 votes
1 answer
212 views

How can I create a custom arrow-shaped legend key

I'm creating a plot using Matplotlib. I want the legend keys (the shapes next to the descriptive text in the legend) to be arrows similar to the ones present in the figure. I've been able to get an ...
Porter's user avatar
  • 3
3 votes
2 answers
273 views

Increase spacing between legend groups with patchwork settings

UPDATE: The suggested code here p1 + p2 + p3 + plot_layout(ncol = 1) + plot_annotation(tag_levels = 'a') & theme(legend.justification = "left") returned this I need to have the ...
hnguyen's user avatar
  • 804
0 votes
1 answer
80 views

Amchart 4 Legend In Arabic not Showing Properly

I want To start the Legend marker from the right side I already used these three Properties. chart.legend.reverseOrder = true; chart.legend.itemContainers.template.reverseOrder = true;chart.rtl = true;...
wajiha siddiqui's user avatar
0 votes
0 answers
34 views

EXTJS Piecharts are not showing legend for dynamic data

Hello I have 2 pie charts one with static data and one with dynamic. The static piechart shows the legend however the dynamic one doesnt. Its the same code for both one. Both have the same fields from ...
Jack's user avatar
  • 1
1 vote
3 answers
160 views

Changing legend symbols in ggplot2

I have this plot made in ggplot2 With the following code: colors4 <- c("Exp" = "#000000", "TL 1" = "#56B4E9", "TL 2"="#CC79A7", "TL ...
David Moldes's user avatar
0 votes
1 answer
259 views

R survminer::ggsurvplot duplicates legend when setting linetype

Reproducible example: require(Survival) require(survminer) require(ggplot2) set.seed(42) a <- c(32,291,545, 44,3,792,352, 20,615,169, 61,156, 88,863,255, 33,132,5, 63,8,964,831, 55,133, 12,...
Reader 123's user avatar
0 votes
1 answer
291 views

Problem with handling multiple legends in subplots when you use plt.twinx()

I'm struggling to pass the list of my subplots with different scales on sides using plt.twinx() in each subplot to show all labels in a single legend box, but I get the following error: ...
Mario's user avatar
  • 1,821
0 votes
1 answer
332 views

How to avoid data disappearing from graph when click on the legend - React ECharts

I am trying to avoid the default click behavior on the legend of React ECharts. When the user click on any legend item, the corresponding plotted data disappear from the graph until the user click on ...
user2403607's user avatar
0 votes
1 answer
175 views

Adjust spacing between 2 markers of same line displayed in the legend of matplotlib plot

I am plotting 2 markers of the same line using the following code and I want to adjust the spacing between two markers in the legend. Code : ref. import matplotlib.pyplot as plt from matplotlib....
Natasha's user avatar
  • 1,431
0 votes
1 answer
60 views

Only one legends shows up: multiple legends in ggplot with different data types

I am trying to make a boxplot of 2 different beta coefficients (returned from a model) from two groups of categories and I want to overlay the "true parameterized" beta coefficient on top of ...
Jade131621's user avatar
0 votes
1 answer
38 views

R ggplot mixed legend of two legends

Here is the graph that I have as a basis: color_two_groups_type_2 <- c("dark red", "black") pd <- position_dodge(0.4) hedonic_price_indices %>% ggplot(aes(x=year, y=index,...
SCW16's user avatar
  • 413
1 vote
0 answers
201 views

Make legend horizontal and reduce the size in Plotly Dash

I am trying to make the attached legend horizontal and smaller in size but it's not working. Also if you see the Plot is hidden below the legend. (Some states are not visible) How can I set that to ...
Himanshu Joshi's user avatar

15 30 50 per page
1
2
3 4 5
17