Skip to content

Commit

Permalink
v.boxplot: update content to match new name (#1000)
Browse files Browse the repository at this point in the history
Update the files to match the new name v.boxplot (follow up on #999)
Update docs to follow markup guidelines
  • Loading branch information
ecodiv committed Dec 27, 2023
1 parent 1056e09 commit d37ce34
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/vector/v.boxplot/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MODULE_TOPDIR = ../..

PGM = d.vect.colbp
PGM = v.boxplot

include $(MODULE_TOPDIR)/include/Make/Script.make

Expand Down
47 changes: 28 additions & 19 deletions src/vector/v.boxplot/v.boxplot.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
<h2>DESCRIPTION</h2>

<p>
<em>d.vect.colbp</em> draws a boxplot of the values in a vector
<em>v.boxplot</em> draws a boxplot of the values in a vector
<em>map</em> attribute <em>column</em>. The user can use the
<em>where</em> option to only select a subset of the attribute table.
There is also the option to group the values of the column according to
the categories in a second column (<em>group_by</em> and create one plot
with for each group a separate boxplot.

<p>
By default, the resulting plot is displayed on screen (default).
However, the user can also save the plot to file using the
<em>plot_output</em> option. The format is determined by the extension
given by the user. So, if plot_output = outputfile.png, the plot will
be saved as a png file.
By default, the resulting plot is displayed on screen (default).
However, the user can also save the plot to file using the
<em>plot_output</em> option. The format is determined by the extension
given by the user. So, if <tt>plot_output = outputfile.png</tt>tt>, the
plot will be saved as a png file.

<p>
There are a few additonal layout options, including the option to rotate
the plot and the x-axis labels. Furthermore, the user can optinally plot
the boxplot(s) with notches and without outliers.

<h2>NOTE</h2>
<p>
This script, based on d.vect.colhist, is a quick and dirty solution
sing basic matplotlib, and will need some further fine-tuning and
testing.

<h2>EXAMPLE</h2>

<h3>Example 1</h3>
Expand All @@ -36,14 +30,15 @@ <h3>Example 1</h3>
all records with no data.

<div class="code"><pre>
d.vect.colbp -n map=schools_wake column=CORECAPACI where="CORECAPACI >0"
v.boxplot -n map=schools_wake column=CORECAPACI where="CORECAPACI >0"
</pre>
</div>

<p>
<img src="d_vect_colbp_01.png"><br>
<em>Figure 1: Boxplot of core capacity of schools in Wake County.</em>

<div align="center" style="margin: 10px"> <a href="v_boxplot_01.png">
<img src="v_boxplot_01.png" alt="v.boxplot: Boxplot of core capacity of
schools in Wake County." border="0"> </a><br> <i>Figure 1: Boxplot of
core capacity of schools in Wake County.</i> </div>

<h3>Example 2</h3>
Use the vector layer <em>schools_wake</em> from the
Expand All @@ -54,14 +49,28 @@ <h3>Example 2</h3>

<div class="code">
<pre>
d.vect.colbp -h --overwrite map=schools_wake column=CORECAPACI where="CORECAPACI >0" group_by=ADDRCITY order=ascending
v.boxplot -h --overwrite map=schools_wake column=CORECAPACI where="CORECAPACI >0" group_by=ADDRCITY order=ascending
</pre>
</div>

<p>
<img src="d_vect_colbp_02.png"><br>
<em>Figure 2" Boxplot of core capacity of schools in Wake County, grouped by city.</em>
<div align="center" style="margin: 10px"> <a
href="v_boxplot_02.png"> <img src="v_boxplot_02.png" alt="v.boxplot:
Boxplot of core capacity of schools in Wake County, grouped by city"
border="0"> </a><br> <i>Figure 2: Boxplot of core capacity of schools
in Wake County, grouped by city.</i> </div>

<h2>SEE ALSO</h2>

<em>
<a href="https://grass.osgeo.org/grass-stable/manuals/addons/v.scatterplot.html">v.scatterplot</a>,
<a href="https://grass.osgeo.org/grass-stable/manuals/addons/d.vect.colhist.html">d.vect.colhist</a>,
<a href="https://grass.osgeo.org/grass-stable/manuals/addons/r.boxplot.html">r.boxplot</a>,
<a href="https://grass.osgeo.org/grass-stable/manuals/addons/r.series.boxplot.html">r.series.boxplot</a>,
<a href="https://grass.osgeo.org/grass-stable/manuals/addons/t.rast.boxplot.html">t.rast.boxplot</a>,
<a href="https://grass.osgeo.org/grass-stable/manuals/addons/r.scatterplot.html">r.scatterplot</a>
<a href="https://grass.osgeo.org/grass-stable/manuals/addons/r3.scatterplot.html">r3.scatterplot</a>
</em>

<h2>AUTHOR</h2>

Expand Down
4 changes: 2 additions & 2 deletions src/vector/v.boxplot/v.boxplot.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env python
############################################################################
#
# MODULE: d.vect.colboxplot
# MODULE: v.boxplot
# AUTHOR: Paulo van Breugel
# PURPOSE: Draws the boxplot(s) of values in a vector attribute column
#
# COPYRIGHT: (c) 2019 Paulo van Breugel, and the GRASS Development Team
# COPYRIGHT: (c) 2019-2023 Paulo van Breugel, and the GRASS Development Team
# This program is free software under the GNU General Public
# License (>=v2). Read the file COPYING that comes with GRASS
# for details.
Expand Down

0 comments on commit d37ce34

Please sign in to comment.