I am trying to visualize my data using bar plots in the plotly package in R. My data has a large range due to which some of the smaller values get smashed to the floor, which is expected. I would like to know if there is a better way to present data with such large ranges. Here is an example of what I am referring to:
cost<- c(10,100,5,6,1,0.2)
fruits<-c("Apple","Grapes","Orange","Mango","Banana","Peach")
fruit_data <- data.frame(fruits,cost)
Bar_Plot <- plot_ly(fruit_data, x = ~fruits, y = ~cost,textposition='auto',type = 'bar') %>% layout(title="Cost of Fruits",xaxis=list(title='Fruits'),yaxis = list(title = 'cost',range=c(0,105)))
show(Bar_Plot)
Here is a visualization of the above code. As you can see, the cost of peach and banana is quite close to the figure's floor and hard to differentiate in terms of cost. I know I can display the actual values above each bar, but I am looking for ways to visually exaggerate smaller values. I am also open to other methods of visualization. Thank you so much for your feedback and suggestions.
