Skip to main content

All Questions

0 votes
1 answer
464 views

How to avoid overlapping and stack long text legends in D3 graph?

I have D3 graph base on Multi-line graph 3 with v7: Legend, this sample contains few and shorts legends for the graph. In my sample I want to increase the length for legends and stack the data if is ...
Tabares's user avatar
  • 4,247
2 votes
1 answer
12k views

Is there a way to rename the categories of the legend?

I'm looking for a way to change the name of the legend of the graph without changing the data?
rushi's user avatar
  • 233
4 votes
2 answers
14k views

How can I put different legends to subplots in plotly?

I am still designing what kind of plot with subplots I want to do but when we see the example in the documentation Multiple Subplots with Titles we have from plotly.subplots import make_subplots ...
KansaiRobot's user avatar
  • 9,103
0 votes
0 answers
386 views

Plotting a legend using legend(x,y ....) but x axis are dates in R

I'm trying to put a legend on a line graph using legend(x,y, legend=c("","").... etc. I've changed the date to numeric data and used that for x and it plots, so I know the rest of ...
Jack's user avatar
  • 3
0 votes
1 answer
2k views

ggplot box plot with data points: how to control legend appearance?

I tried various options, but I cannot find a way to achieve custom legend appearance (unless I export the figure to power point and edit it there...). I would like the legend to look like in the image ...
user7395965's user avatar
0 votes
0 answers
406 views

How to add a condition to legend labelling to show certain entries only

is it possible to create plot labels based on conditions? As one can see below, I am creating plots within a loop. The issue is that not all locations of the dataset contain data to plot as time ...
user17681970's user avatar
0 votes
2 answers
453 views

How to convert a bar legend to line legend in chart.js 2.7.2?

I am trying to create a line graph using chart.js v2.7.2 and here is what it looks like: const labels = [ 'January', 'February', 'March', 'April', 'May', 'June', ]; const data = { ...
Shilp Thapak's user avatar
4 votes
1 answer
228 views

Is it possible to add 6 colors in one key-label in my legend with ggplot2?

I am very new here, but I've always had so much help going trough other peoples questions and answers that I thought I'd try if anybody could help me out. I think I might just be looking for something ...
TesselL's user avatar
  • 43
0 votes
1 answer
157 views

Changing Legend Items ggplot

I am trying to create a chart, but I can't change the names of the legend items. My database is in Spanish, and I need the legend items to appear in English. Legend Items. Instead of "70 o más&...
ntcha's user avatar
  • 41
3 votes
1 answer
531 views

Adjusting the legend spacing in Matlab

I have slightly lengthy legend titles as shown in the figure below. Is there a way to adjust the location of 'a val' / 'b val' more towards the centre of their title name (move leftwards)? Similarly ...
Shiva's user avatar
  • 69
1 vote
1 answer
127 views

How to unify a legend with different types of scales in ggplot?

I have a data frame separated by 3 different factors. I want to represent this data frame with a scatter plot, using different types of scale for each factor. I want to use shapes 21, 22 and 24, which ...
Daniel Valencia C.'s user avatar
0 votes
1 answer
740 views

Rearranging legend order plotted using ggsurv for Kaplan Meier curves

I plotted Kaplan Meier curves for my data which is for 6 different treatments namely: 100Low 30Low 15Low 100High 30High 15High I want my legend to be in the sequence that I mentioned above however ...
Muhammad Usama Ashraf's user avatar
1 vote
0 answers
220 views

ChartJS Stacked Bar Chart Display Stack Names in Legend

I have a stacked bar graph and wish to divide the data labels in the legend into groups based on the stack id/name to which they relate by including the stack id/name as header for each group of ...
dickey's user avatar
  • 21
2 votes
1 answer
1k views

How to adjust scale of ggplot legend when saturating color

When creating raster plots, I want to saturate the color bar at min and max levels to emphasize a certain range. In this case, I want to emphasize the mid range (19-30), even though the actual range ...
Vint's user avatar
  • 487
0 votes
1 answer
295 views

Change the order of the legend in a plot in Pandas

I have been trying to change the order of the legend on a plot in Pandas to get it in the same order as the plot appears: Screenshot of the code and the plot in Anaconda As you see, the plots are ...
Tatiana Rios's user avatar

15 30 50 per page
1 2 3
4
5
17