rekonstrukt / swedishbutterflies

Swedish Butterflies - tools and apps
GNU Affero General Public License v3.0
1 stars 3 forks source link

Histogram minimal scale #6

Closed larspett closed 6 years ago

larspett commented 6 years ago

In the reports, I have set the minimal Y axis scale to 0...10 whenever there are less than 10 individuals in the tallest bar. Unless R does something like this by itself, the feature needs to be added.

Otherwise Excel has been roaming free to set the scale whenever the tallest bar is >= 10 so I assume R will be doing the same (and better).

mskyttner commented 6 years ago

I added this for the value scale to achieve the minimal scale and to allow tallest bars to roam free in sebms_species_histo_plot_orig():

scale_y_continuous(limits = c(0, max(10, df$count)), expand = c(0, 0.6))