grass-addons icon indicating copy to clipboard operation
grass-addons copied to clipboard

Addons for plotting: Standardize parameters and flags

Open veroandreo opened this issue 9 months ago • 3 comments

Context

While creating a tutorial on the use of GRASS GIS addons to create plots, I found out that parameters doing the same task were sometimes named differently. Also, there were some addons providing a lot of control over the plot, and others much less so. I ended up creating a big double entry table comparing flags and parameters names and functionalities across GRASS addons for creating plots.

This issue attempts to point out which addons would need flag/parameter name standardization and which would benefit from the addition of further options already present in some but not all.

Parameter name standardization

  • [ ] r.boxplot: input should be changed to map
  • [x] v.boxplot, v.scatterplot and v.histogram: plot_output and file_name should be changed to output
    • Implemented in #1075 , but wondering, do we need to keep the old parameter for backward compatibility (not my preference, but if needed, can somebody tell me the best way to do that?)
  • [x] t.rast.boxplot and t.rast.line: font_size should be changed to fontsize consistently with d.* modules in core done in #1075
  • [ ] r.boxplot and v.boxplot: standardize parameter to sort boxplots based on median values
  • [ ] r.boxplot, r.series.boxplot and t.rast.boxplot: standardize option for boxplot fill color
  • [ ] r.boxplot, r.series.boxplot and t.rast.boxplot: standardize option for boxplot width
  • [ ] v.boxplot and v.scatterplot: standardize option to group by
  • [x] v.scatterplot and t.rast.line: standardize option for number of SD to plot.
    • Change sd_n to n in v.scatterplot because in t.rast.line the n is for are sd or se. (done in #1085)
  • [ ] v.scatterplot, t.rast.boxplot and t.rast.line: standardize option to set y axis range values
    • what about axis_limits, y_axis_limits and x_axis_limits (which to use depend on options for the particular plot type)?
    • Done for v.scatterplot following suggestion above bulletpoint.

Change flag default behavior

  • [ ] v.boxplot: -o flag in v.boxplot hides outliers, while in the other boxplot addons it includes outliers.

Flags into parameters

  • [ ] v.boxplot: convert flag -r in into rotate_labels

Add other control parameters or flags (parameter name: addons that would benefit from the added parameter / addon name: parameters)

  • [ ] plot_dimensions: v.boxplot, v.histogram
  • [ ] fontsize: v.boxplot, v.histogram
  • [ ] title: r.boxplot, r.series.boxplot, v.boxplot, v.histogram, t.rast.boxplot, t.rast.line
  • [ ] y axis title: r.boxplot, r.series.boxplot, v.boxplot, v.histogram
  • [ ] x axis title: r.boxplot, r.series.boxplot, v.boxplot, v.scatterplot, v.histogram, t.rast.boxplot, t.rast.line
  • [ ] y axis range: r.boxplot, r.series.boxplot, v.boxplot, v.scatterplot, v.histogram, t.rast.boxplot
  • [ ] where: v.scatterplot
  • [ ] r.series.boxplot: bx_lw, median_lw, median_color, whisker_linewidth
  • [ ] v.boxplot: bx_color, bx_width, bx_lw, median_lw, median_color, whisker_linewidth, flier_marker, flier_size, flier_color

In these latter 2, ideally standardize also how to spell boxplot (bx or boxplot) and line width (lw and linewidth).

Wishes

  • [ ] r.boxplot, v.boxplot: add the possibility to order boxplots ad hoc according to their x label (eg, alphabetically, ascending, descending or customized)

Happy to share the spreadsheet if anyone is interested :)

veroandreo avatar Apr 25 '24 21:04 veroandreo

Good work @veroandreo. Great if you can share the spreadsheet. As I created most of those addons, I feel obliged to act upon this, but time is a bit limited. Something to take up during the community meeting, if not done before?

By the way, writing a tutorial on the plotting addons has also be on my to-do list for some time. I haven't found the time yet, so great you are working on this. Something to work on together?

ecodiv avatar Apr 28 '24 15:04 ecodiv

Good work @veroandreo. Great if you can share the spreadsheet. As I created most of those addons, I feel obliged to act upon this, but time is a bit limited. Something to take up during the community meeting, if not done before?

Thanks! Sure! Link to it on your email. Yes, it could indeed be something you could tackle for the community meeting. That'd be great! Some are easy changes, and perhaps I could start, but others, especially adding missing options, I leave that to you ;-)

By the way, writing a tutorial on the plotting addons has also be on my to-do list for some time. I haven't found the time yet, so great you are working on this. Something to work on together?

Sure! The tutorial is here: https://github.com/ncsu-geoforall-lab/tutorials/blob/main/good_looking_plots_in_grass.qmd. I wrote it with quarto because I like the rendering, but that might change. In any case, feedback is welcome to enhance it!!

veroandreo avatar Apr 29 '24 14:04 veroandreo

Good work @veroandreo. Great if you can share the spreadsheet. As I created most of those addons, I feel obliged to act upon this, but time is a bit limited. Something to take up during the community meeting, if not done before?

Thanks! Sure! Link to it on your email. Yes, it could indeed be something you could tackle for the community meeting. That'd be great! Some are easy changes, and perhaps I could start, but others, especially adding missing options, I leave that to you ;-)

By the way, writing a tutorial on the plotting addons has also be on my to-do list for some time. I haven't found the time yet, so great you are working on this. Something to work on together?

Sure! The tutorial is here: https://github.com/ncsu-geoforall-lab/tutorials/blob/main/good_looking_plots_in_grass.qmd. I wrote it with quarto because I like the rendering, but that might change. In any case, feedback is welcome to enhance it!!

Thanks, I'll have a look. B.t.w., quarto is my preferred notebook format for various reasons, so I hope you keep it.

ecodiv avatar Apr 29 '24 15:04 ecodiv