All Questions
106
questions
0
votes
0
answers
74
views
How to fix missing legend from base plot in r?
Trying to add a legend to my plot (please see below). The sample code I used works fine (using "center"). My code below does not get a legend (at least not one that I can see as I have poor ...
0
votes
0
answers
34
views
Matplotlib legend position for graphs
x = ['TPhP', 'TPrP', 'THP', 'OEP', 'Aristophyll A', 'TETMP', 'DMDHP', 'THDPP', 'BDTDP']
plt.xticks(range(len(x)), x, rotation='vertical')
plt.ylim([-6, 12])
y1 = [-3.8681, -3.7851, -3.6178, -3....
1
vote
1
answer
160
views
Removing an unnecessary legend from a visualisation in VegaLite
I've created this visualization in VegaLite but I'm having an issue with the legends of my graphs. The visualization is a scatterplot, bar chart, and 2 strip plots, of which the scatterplot and bar ...
0
votes
1
answer
89
views
Why is there multiple indentical entries in a legend when plotting with matplotlib? [duplicate]
I try to plot a list a of values with respect to time and I have two examples: one where Im plotting angular velocities and the other where Im plotting linear accelerations. For both graphs the code ...
1
vote
1
answer
113
views
How do I move and unstack legend elements when using ggplot and ggpattern?
I have data with two different categorical grouping variables, and to distinguish between them, I followed this guide to add a pattern to one of the categorical variable types. However, now that I've ...
0
votes
1
answer
45
views
ggplot2 - wrap data around legend in custom position
When placing a legend in a custom position (using legend.position = c(x, y)) in a ggplot, is it possible to format the legend so that it does not overlay the data, and instead, the datapoints wrap ...
0
votes
1
answer
319
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 ...
0
votes
1
answer
490
views
How to combine colour and linetype into a single legend?
I am trying to combine two legends of unequal length into a single length and am having some problems. I am using colour to represent 3 different populations, whereas I'm using linetype to show ...
1
vote
1
answer
380
views
How can I completely remove legend.key from ggplot2 legend?
I'm plotting a graph and I need to completely remove the legend.key from my ggplot legend. Why I need to do this? The legend starts with a number that reference the X axis breaks, and the label its ...
-1
votes
1
answer
359
views
Use variables in legend handles
I want to graph multiple different bar charts and the colors in each graph will vary depending on the data being plotted. I would like to have a legend with handles (to accompany each set of data and ...
0
votes
1
answer
194
views
How to remove duplicates and move the legend list to outside of the graph concurrently?
I have seen many good questions questions and answers, but I am not sure how to combine two of them:
How to put the legend outside the plot
Duplicate items in legend in matplotlib?
These two ...
1
vote
0
answers
1k
views
How do I stop a ggplot graph legend from getting cut off on the right when exporting-saving when using showtext?
Just started R a couple weeks ago. Getting familiar with ggplot. I successfully made the graph I wanted to including all legends, axes titles, etc. I'm able to export/save this image fine. However, ...
1
vote
1
answer
374
views
adding a legend to a barplot at he top left
barcols <- c("green","red","purple")
barcols
barplot(table(gender$Alert.Level, gender$Gender),las=1, beside= TRUE, ylab= "Frequency", xlab="gender"...
-1
votes
1
answer
237
views
Add labels to lines plotly
I needed some help labeling some overlaying lines in plotly.
I have a dataframe that consists of the following columns:
df$date = c("2014-09-30","2016-03-31","2016-03-31")...
0
votes
1
answer
446
views
JFreeChart how to manually add the legend into plot graph
I have used JFreeChart library in java to draw one line with points ie. plot.
The points have two kind of color - green or blue. Below is some sample with different colors.
I would like to display two ...