Skip to main content

Questions tagged [legend]

A graph legend is commonly used when plotting several sets of data within the same diagram. The legend associates each plot with its corresponding data.

1,295 questions with no upvoted or accepted answers
-2 votes
1 answer
53 views

how to get a legend on ggplot, when working with 2 data sets on one graph?

I have used the code below to produce a graph showing the results from 2 different data sets, shown as two lines on a graph. The code doesn't bring up a legend and nothing I do from any of these ...
ELD's user avatar
  • 1
-2 votes
2 answers
57 views

Fit of the weekday variables in the plot in R

Plot is overlapping Here is my code, perc2 %>% barplot(main = "Sample Observations by Day of Week and Season", ylab="Percentage", xlab="Season", beside=TRUE, legend=...
Abhishek Murkhande's user avatar
-2 votes
1 answer
144 views

How to add legend with ggplot2

how to add legend with ggplot2,every color represent a kind of distrbution ,data Nor_1 can download at http://pan.baidu.com/s/1dDCiTNj ,my code is as follows: set.seed(100) ggplot()+geom_density(aes(...
user4672728's user avatar
-2 votes
1 answer
347 views

How do I get the legend in ggplot2 histogram?

I really want to get the legend into the histogram. And I can't figure out what's going on here. ggplot(data=Male, aes(Male$Naval.Girth)) + geom_histogram(aes(y =..density..), ...
N Woods's user avatar
  • 37
-3 votes
1 answer
348 views

Legend is apears in the wrong place in the page (R): not fully shown

I have added the following command to the plot in R: df<- read.table("filename.csv", header=TRUE, sep=",", stringsAsFactors=FALSE) tdf=as.data.frame(df[2:ncol(df)]) # draw the plot bb<- ...
S.EB's user avatar
  • 2,198

15 30 50 per page
1
83 84 85 86
87