Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

r - How to set xlim and ylim range in a highcharter plot?

I'm trying to set a specific range in my highcharter axes plot

 library(highcharter) 
 h <- highchart() %>% 
      hc_title(text = "Scatter chart with size and color") %>% 
      hc_add_series_scatter(mtcars$wt, mtcars$mpg) %>% 
      hc_exporting(enabled = TRUE)
h

The current result: scatter with range = c(5, 40) at xlim

The desired plot: scatter with range = c(5, 35) at ylim

Does anyone have ideas?

like image 468
gonzalez.ivan90 Avatar asked Feb 08 '17 17:02

gonzalez.ivan90


1 Answers

As Pierre Lafortune commented, the answer is:

%>% hc_yAxis(max = 35)
like image 54
gonzalez.ivan90 Avatar answered Sep 22 '22 12:09

gonzalez.ivan90