• Register
0 votes

Problem :

While drawing graphs using ggplot2 getting bellow error
statbin requires a continuous x variable the x variable is discrete. perhaps you want stat="count"?
6 5 3
6,930 points

1 Answer

0 votes

Solution :

I had the same issue in the past to resolve my issue i followed bellow instructions

Please use geom_bar() instead of geom_histogram, Also please refer sample code given bellow it provides separate graph for each month for birth date data:

ggplot(data = pf,aes(x=dob_day))+
scale_x_discrete(breaks = 1:31)+
facet_wrap(~dob_month,ncol = 3)
9 7 4
38,600 points

Related questions

0 votes
1 answer 53 views
0 votes
1 answer 46 views
I am trying to run the rWBclimate package in RStudio. I copied the following code from ROpenSci and pasted it into RStudio. But I get an error saying 'I don't know how to automatically choose scale for list of type objects. Default error to continuous error: geom_point requires the following ... 50 50 50 50 50 50 ... $ locator: chr "GBR" "GBR" "GBR" "GBR" ... Looking for your helpful answers.
asked Aug 17 game 4.6k points
0 votes
1 answer 2.2K views
Problem : Currently I am trying to create a heatmap using a ggmosaic, But I keep facing below error “Error in is.finite(x) : default method not implemented for type 'list'” My Configuration is Windows, RStudio, R version mostly one before a most recent, and ggmosaic Ver 0.1.2 How can I fix the above error?
asked Feb 20 mphil 2.3k points
0 votes
1 answer 636 views
Problem : I need answer to bellow issue don't know how to automatically pick scale for object of type data.frame. defaulting to continuous.
asked Nov 7, 2019 peterlaw 6.9k points
1 vote
1 answer 1.8K views
Problem : I am facing error related to ggproto as following error: cannot add ggproto objects together. did you forget to add this object to a ggplot object?
asked Nov 11, 2019 peterlaw 6.9k points