isoverse / isoorbi

https://www.isoverse.org/isoorbi
Other
3 stars 1 forks source link

Shot noise plot doesn't take extra colors #48

Open brettdavidheiser opened 4 months ago

brettdavidheiser commented 4 months ago

I have 12 things I want to plot and when I try and add extra colors to the function call it doesn't work. It says I gave 9 no matter how many I provide.

Ti.data |> orbi_flag_weak_isotopocules(80)|>orbi_analyze_shot_noise() |>orbi_plot_shot_noise(colors = c("#1B9E77", "#D95F02", "#7570B3", "#E7298A", "#66A61E", "#E6AB02", "#A6761D", "#666666","#555","#E77","#1B9","#E12","#66A","#A67"))

orbi_flag_weak_isotopocules() is flagging isotopocules from data that are detected in less than 80% of scans in 2 data group(s) (based on 'filename', 'compound')... flagged 3/26 isotopocules across all data groups (useorbi_plot_isotopocule_coverage()to visualize them) in 0.10 seconds. orbi_analyze_shot_noise() is analyzing the shot noise for 3145 peaks (excluded 187 flagged peaks)... calculations finished in 0.04 seconds. Error inpalette()`: ! Insufficient values in manual scale. 12 needed but only 9 provided. Backtrace:

  1. base (local) <fn>(x)
  2. ggplot2:::print.ggplot(x)
  3. ggplot2:::ggplot_build.ggplot(x)
  4. base::lapply(data, scales_map_df, scales = npscales)
  5. ggplot2 (local) FUN(X[[i]], ...) ...
    1. ggplot2 (local) FUN(X[[i]], ...)
    2. self$map(df[[j]])
    3. ggplot2 (local) map(..., self = self)
    4. self$palette(n)
    5. ggplot2 (local) palette(...) Error in palette(...) :`