y-axis not long enough (lessR)

Hello,
I am using the lessR package and the BarChart function to visualise some data. My issue is that the data extends past where the y-axis ends. Any help would be much appreciated, Thanks.

R Script:
#Set working directory
setwd("/Users/ben/Documents/Dissertation /R/DescriptiveStats")
getwd()

#Load in data
library(readr)
Moth_Data <- read_csv("Moth_Species_Sum.csv")
str(Moth_Data)
names(Moth_Data)

###Data visualisation
library(lessR)
install.packages("wesanderson")
library(wesanderson)

BarChart(Main_hab, data = Moth_Data,fill="Zissou1", rotate_x=0, offset=1, sort="-",
xlab = "Main Habitat", ylab = "Count of Species")

Output:

Data:
Main_hab Count Prop

Woodland 51 0.436
Grassland 31 0.265
Mixed 23 0.197
Heathland 5 0.043
Fen 4 0.034
Aquatic 2 0.017
Scrub 1 0.009

Total           117   1.000

the documentation says to use scale_y parameter of BarChart

scale_y = c(0,51,10)

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.