Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addons for plotting: Standardize parameters and flags #1071

Open
3 of 21 tasks
veroandreo opened this issue Apr 25, 2024 · 3 comments
Open
3 of 21 tasks

Addons for plotting: Standardize parameters and flags #1071

veroandreo opened this issue Apr 25, 2024 · 3 comments
Labels
good first issue Good for newcomers

Comments

@veroandreo
Copy link
Contributor

veroandreo commented Apr 25, 2024

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
  • v.boxplot, v.scatterplot and v.histogram: plot_output and file_name should be changed to output
  • t.rast.boxplot and t.rast.line: font_size should be changed to fontsize consistently with d.* modules in core done in Standardize parameters addons for plotting (issue #1071 ) #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
  • v.scatterplot and t.rast.line: standardize option for number of SD to plot.
  • 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 veroandreo added the good first issue Good for newcomers label Apr 25, 2024
@ecodiv
Copy link
Contributor

ecodiv commented Apr 28, 2024

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?

@veroandreo
Copy link
Contributor Author

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!!

@ecodiv
Copy link
Contributor

ecodiv commented Apr 29, 2024

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 added a commit to ecodiv/grass-addons that referenced this issue May 9, 2024
Implementing some of the suggestions in issue OSGeo#1071

Question is how to deal with backward compatibility.
ecodiv added a commit to ecodiv/grass-addons that referenced this issue May 9, 2024
ecodiv added a commit that referenced this issue May 9, 2024
…ith time range

Better handling of relative maps, including the option to use start, end or mid point time if maps represent time ranges + 

-  nproc check
- bugfix week locator
- implented suggestion standardization parameter names from #1071
- added reference to need to set time explicitly in combination with >
ecodiv added a commit to ecodiv/grass-addons that referenced this issue May 24, 2024
Change ylim and xlim to x_axis_limits, see OSGeo#1071
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants