<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style id="bidiui-paragraph-margins" type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body bidimailui-detected-decoding-type="UTF-8"
    bidimailui-charset-is-forced="true" style="direction: ltr;"
    text="#933131" bgcolor="#FFFFFF">
    <p><font size="4">Hi Sibylle:</font></p>
    <p><font size="4"><br>
      </font></p>
    <p><font size="4">So the problem is getting all the vector quadrats
        as a single value into the "zones" raster? Then I would use the
        parameters:</font></p>
    <p><font size="4" face="monospace">'attr=val value=1' </font><font
        size="4">in the v.to.rast step.</font><font size="4"
        face="monospace"><br>
      </font></p>
    <p><font size="4" face="monospace"><br>
      </font></p>
    <p><font size="4">Here, below, are the steps I tried. At the start I
        would point out that the raster
        "al_pres_apple_spring_merged.tif" has very low variance, with
        almost all cells at value 0. When you make of boxplot of these
        values, you get a very narrow band near to the median value,
        very near to zero. Maybe that's what is causing the confusion.<br>
      </font></p>
    <p><font size="4"><font face="monospace"><br>
          <font color="#2c2c2c"># Create new GRASS location/mapset based
            on geotiff<br>
            >grass -c al_pres_apple_spring_merged.tif ./CH1903+LV95<br>
            <br>
            # Now in that location Import both layers<br>
            $ r.import input=al_pres_apple_spring_merged.tif
            output=al_pres<br>
            $ g.region -ap rast=al_pres<br>
            projection: 99 (CH1903+ / LV95)<br>
            zone:       0<br>
            datum:      ch1903<br>
            ellipsoid:  bessel<br>
            north:      1270975<br>
            south:      1118025<br>
            west:       2527000<br>
            east:       2804000<br>
            nsres:      25<br>
            ewres:      25<br>
            rows:       6118<br>
            cols:       11080<br>
            cells:      67787440<br>
            <br>
            # Create raster for zones, all quadrats with the same value<br>
            $ v.to.rast input=quadrat output=quadrat use=val value=1<br>
            # Prepare boxplot, I add the '-o' flag to also plot outliers<br>
            $ r.boxplot -o input=al_pres zones=quadrat
            output="al_pres_boxplot.png" raster_statistics=median<br>
          </font></font></font></p>
    <p><br>
    </p>
    <p><font size="4">Have a look at the attached plot. </font></p>
    <p><font size="4">Now I check the univariate statistics of the
        al_pres raster:</font></p>
    <p><font size="4"><font face="monospace"><font color="#2c2c2c"><br>
          </font></font></font></p>
    <p><font size="4"><font face="monospace"><font color="#2c2c2c">#
            al_pres univariate statistics<br>
            $ r.univar al_pres<br>
             100%<br>
            total null and non-null cells: 67787440<br>
            total null cells: 0<br>
            <br>
            Of the non-null cells:<br>
            ----------------------<br>
            n: 67787440<br>
            minimum: 0<br>
            maximum: 0.315331<br>
            range: 0.315331<br>
            mean: 3.23424e-05<br>
            mean of absolute values: 3.23424e-05<br>
            standard deviation: 0.0022431<br>
            variance: 5.03148e-06<br>
            variation coefficient: 6935.47 %<br>
            sum: 2192.40546066407</font><br>
        </font><br>
        Note that the variance is quite small. No wonder that the
        boxplot shows the median as a very narrow band almost at value
        zero.</font></p>
    <p><font size="4"><br>
      </font></p>
    <p><font size="4">Again, if I'm missing something, let me know.</font></p>
    <p><font size="4"><br>
      </font></p>
    <div class="moz-cite-prefix">On 03/06/2024 13:55,
      <a class="moz-txt-link-abbreviated" href="mailto:sibylle.stoeckli@gmx.ch">sibylle.stoeckli@gmx.ch</a> wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:011c01dab5a4$893dbe80$9bb93b80$@gmx.ch">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator"
        content="Microsoft Word 15 (filtered medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style>@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
        {font-family:Aptos;}@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;
        color:#933131;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:#933131;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:#933131;}p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;
        color:#933131;}span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:#933131;}span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;}span.EmailStyle25
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        mso-ligatures:none;}div.WordSection1
        {page:WordSection1;}ol
        {margin-bottom:0cm;}ul
        {margin-bottom:0cm;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US">Dear
            Micha<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US">Dear
            community<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US">Find
            enclosed the two files necessary to run the code:<o:p></o:p></span></p>
        <ul style="margin-top:0cm" type="disc">
          <li class="MsoListParagraph"
style="color:windowtext;margin-left:0cm;mso-list:l0 level1 lfo7"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">The
              raster file to plot boxplots:
              al_pres_apple_spring_merged.tif<o:p></o:p></span></li>
          <li class="MsoListParagraph"
style="color:windowtext;margin-left:0cm;mso-list:l0 level1 lfo7"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">The
              vector/shape file for the different quares (classes,
              regions…):Untersuchungsquadrate_2020-2024_shp<o:p></o:p></span></li>
        </ul>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"><a
href="https://drive.google.com/drive/folders/14UwptmBQTtKYQFGeecRWa0n_lWDhRc9s?usp=sharing"
              moz-do-not-send="true" class="moz-txt-link-freetext">https://drive.google.com/drive/folders/14UwptmBQTtKYQFGeecRWa0n_lWDhRc9s?usp=sharing</a><o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US">Code
            based on <o:p></o:p></span></p>
        <p class="MsoNormal"><a
href="https://ecodiv.earth/post/drawing-boxplots-of-raster-values/"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://ecodiv.earth/post/drawing-boxplots-of-raster-values/</a><span
style="font-family:"Calibri",sans-serif;color:windowtext"><o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext" lang="DE-CH">g.region
            -a vector=Untersuchungsquadrate_2020_2024 </span><span
style="font-family:"Calibri",sans-serif;color:windowtext"
            lang="DE-CH"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext">raster=
            al_pres_apple_spring_merged.tif<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext">r.mask
            vector=Untersuchungsquadrate_2020_2024<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:windowtext"><o:p> </o:p></span></p>
        <p class="MsoNormal"><a name="_Hlk168039820"
            moz-do-not-send="true"><span style="color:windowtext">v.to.rast
              input=Untersuchungsquadrate_2020_2024@PERMANENT
              output=Quadrate use=attr attribute_column="ID_Quadrat"
              label_column="ID_Quadrat"<o:p></o:p></span></a></p>
        <p class="MsoNormal"><span style="mso-bookmark:_Hlk168039820"><span
              style="font-family:Wingdings;color:windowtext">à</span></span><span
            style="mso-bookmark:_Hlk168039820"><span
              style="color:windowtext"> Here is the identified
              challenge: transformation form “Untersuchungsquadrate” to
              “Quadrate” (as input for r.boxplot). attribute_column
              ID_Quadrat or cat provide false assignment. It just takes
              Number 1 (either cat or ID_Quadrat.<o:p></o:p></span></span></p>
        <p class="MsoNormal"><span style="mso-bookmark:_Hlk168039820"><span
              style="color:windowtext"><o:p> </o:p></span></span></p>
        <p class="MsoNormal"><span style="mso-bookmark:_Hlk168039820"><span
              style="color:windowtext">r.boxplot -o
              input=al_pres_apple_spring_merged.tif zones=Quadrate
              bx_sort=ascending raster_statistics=median</span></span><span
            style="color:windowtext"><o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US">Kind
            regards<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US">Sibylle<o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <div>
          <div
style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">
                <a class="moz-txt-link-abbreviated" href="mailto:sibylle.stoeckli@gmx.ch">sibylle.stoeckli@gmx.ch</a> <a class="moz-txt-link-rfc2396E" href="mailto:sibylle.stoeckli@gmx.ch"><sibylle.stoeckli@gmx.ch></a>
                <br>
                <b>Sent:</b> Friday, May 31, 2024 12:10 PM<br>
                <b>To:</b> 'Micha Silver' <a class="moz-txt-link-rfc2396E" href="mailto:tsvibar@gmail.com"><tsvibar@gmail.com></a>;
                '<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>'
                <a class="moz-txt-link-rfc2396E" href="mailto:grass-user@lists.osgeo.org"><grass-user@lists.osgeo.org></a><br>
                <b>Subject:</b> RE: [GRASS-user] raster boxplots wrong
                assignment<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US">Yes:
            see line 3<o:p></o:p></span></p>
        <p class="MsoNormal"><img style="width:3.9791in;height:7.7395in"
            id="Picture_x0020_8"
            src="cid:part1.NCKMXMwb.uum4rUFw@gmail.com" class=""
            width="382" height="743" border="0"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"><o:p></o:p></span></p>
        <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
        <div>
          <div
style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">
                Micha Silver <<a href="mailto:tsvibar@gmail.com"
                  moz-do-not-send="true" class="moz-txt-link-freetext">tsvibar@gmail.com</a>>
                <br>
                <b>Sent:</b> Friday, May 31, 2024 12:06 PM<br>
                <b>To:</b> <a href="mailto:sibylle.stoeckli@gmx.ch"
                  moz-do-not-send="true" class="moz-txt-link-freetext">sibylle.stoeckli@gmx.ch</a>;
                <a href="mailto:grass-user@lists.osgeo.org"
                  moz-do-not-send="true" class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a><br>
                <b>Subject:</b> Re: [GRASS-user] raster boxplots wrong
                assignment<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <div>
          <p class="MsoNormal">On 31/05/2024 12:48, <a
              href="mailto:sibylle.stoeckli@gmx.ch"
              moz-do-not-send="true" class="moz-txt-link-freetext">sibylle.stoeckli@gmx.ch</a>
            wrote:<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US">Dear
              Micha</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US">Thanks
              a lot interesting idea: Unfortunately I got a parse error.
              However the error/challenge is bevore selecting a specific
              region or site. I was able to plot one boxplot using a
              different code.</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US">The
              challenge is that I use this code here to make
              “Quadrate/Squares” out of the vector layer
              “Untersuchungsquadrate”, because in r.boxplot you have
              input raster and zonal raster. Exactly in this code you
              make the assignment by defining attribute_column. I used
              both cat and ID_Quadrate, but it seems that my rasterized
              file “Quadrate” is not yet the one I need.</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
        </blockquote>
        <p class="MsoNormal">Can you post the output of: <span
            style="font-size:18.0pt;font-family:"Courier New"">v.info
            -c Untersuchungsquadrate_2020_2024</span><span
            style="font-size:18.0pt"> </span> ? (Just to verify the
          ID_Quadrate column)<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><a
href="https://ecodiv.earth/post/drawing-boxplots-of-raster-values/"
              moz-do-not-send="true">Ecodiv.earth - Boxplots based on
              raster data in GRASS GIS</a><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal">v.to.rast
            input=Untersuchungsquadrate_2020_2024@PERMANENT
            output=Quadrate use=attr attribute_column=cat
            label_column="ID_Quadrat"<o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
        </blockquote>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">OK, after this command you should have a
          new raster "Quadrate" with pixel values taken from the cat
          values of the vector. (Why cat and not the ID_Quadrate?)<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
          <p class="MsoNormal"><img
              style="width:6.5729in;height:6.8958in" id="_x0000_i1031"
              src="cid:part2.2diRU7xX.W4fcQSu5@gmail.com" class=""
              width="631" height="662" border="0"><o:p></o:p></p>
        </blockquote>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">In the r.mapcalc expression:<o:p></o:p></p>
        <p class="MsoNormal">1- The full expression needs to be in
          double quotes, <o:p></o:p></p>
        <p class="MsoNormal">2- You need to use an existing **raster**
          map. Not the vector attribute values.<o:p></o:p></p>
        <p class="MsoNormal">i.e.<o:p></o:p></p>
        <p class="MsoNormal"><span
            style="font-size:18.0pt;font-family:"Courier New"">r.mapcalc
            "MASK = if(Quadrate == 803174), 1, NULL())"</span><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">But, as you can see below (since you used
          the Untersuchungsquadrate_2020_2024 <b>cat</b> values
          (instead of the <b>ID_Quadrate </b>attrib), the raster
          values vary from 1 to 179. No value 803174...<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">I'd suggest to go back to using ID_Quadrate
          as attribute_column in your <span
            style="font-size:18.0pt;font-family:"Courier New"">v.to.rast
          </span>.  Then try the r.mapcalc expression to get the mask
          defined. (Don't forget to remove the mask after: r.mask -r)<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">HTH<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><img
              style="width:6.4895in;height:6.0729in"
              id="Picture_x0020_7"
              src="cid:part3.L1h80OC0.Kz4FqSEd@gmail.com" class=""
              width="623" height="583" border="0"><o:p></o:p></p>
          <div>
            <div
style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
              <p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext">
                  Micha Silver <a href="mailto:tsvibar@gmail.com"
                    moz-do-not-send="true"><tsvibar@gmail.com></a>
                  <br>
                  <b>Sent:</b> Friday, May 31, 2024 11:09 AM<br>
                  <b>To:</b> <a href="mailto:sibylle.stoeckli@gmx.ch"
                    moz-do-not-send="true" class="moz-txt-link-freetext">sibylle.stoeckli@gmx.ch</a>;
                  <a href="mailto:grass-user@lists.osgeo.org"
                    moz-do-not-send="true" class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a><br>
                  <b>Subject:</b> Re: [GRASS-user] raster boxplots wrong
                  assignment</span><o:p></o:p></p>
            </div>
          </div>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:13.5pt">Hi
              Sibylle:</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:13.5pt">I'm not
              sure I fully understand the problem. If the below example
              is not relevant, just ignore...</span><o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:13.5pt">I did a
              simple test using the nc_spm_08 location. The PERMANENT
              mapset includes an elevation raster 'elev_srtm_30m' and a
              categorical landcover raster 'landclass96'. I used the
              landcover raster as zones, and elevation for the values in
              the boxplots.</span><o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:18.0pt;font-family:"Courier New";color:black;background:white">g.region
              -ap rast=elev_srtm_30m</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:18.0pt;font-family:"Courier New";color:black;background:white">#
              All landcover zones</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:18.0pt;font-family:"Courier New";color:black;background:white">r.boxplot
              input=elev_srtm_30m zones=landclass96
              raster_statistics=median output=~/work/tmp/boxplot.png --o</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:18.0pt;font-family:"Courier New";color:black;background:white">#
              See attached boxplot image</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:18.0pt;font-family:"Courier New";color:black;background:white">#
              Now limit to only one zone, the forests, class 5 in this
              raster:</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:18.0pt;font-family:"Courier New";color:black;background:white">r.mapcalc
              "MASK = if(landclass96 == 5, 1, null())"</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:18.0pt;font-family:"Courier New";color:black;background:white">r.boxplot
              input=elev_srtm_30m zones=landclass96
              raster_statistics=median
              output=~/work/tmp/boxplot_forest.png</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:18.0pt;font-family:"Courier New";color:black;background:white">#
              See attached boxplot_forest</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:18.0pt;font-family:"Courier New";color:black;background:white">r.mask
              -r</span><o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"><span style="font-size:13.5pt">Hope this
              is somehow helpful.</span><o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <div>
            <p class="MsoNormal">On 31/05/2024 10:35, sibylle via
              grass-user wrote:<o:p></o:p></p>
          </div>
          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Dear
                community</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">I
                tested the r.boxplot addon and it is definitively
                possible to run the addon with more than 20
                classes/regions/sites/squares.</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Furthermore
                I realised the reason for the wrong assignment of class
                to raster, but I am not yet able to fix it.</span><o:p></o:p></p>
            <ol style="margin-top:0cm" type="1" start="1">
              <li class="MsoListParagraph"
                style="margin-left:0cm;mso-list:l1 level1 lfo3"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">The
                  challenge is, that (at the moment) I have raster data
                  for one class (one square), but in total I have 150
                  squares. So at the moment it just selects the first
                  square (either by cat oder ID_Quadrat).</span><o:p></o:p></li>
              <li class="MsoListParagraph"
                style="margin-left:0cm;mso-list:l1 level1 lfo3"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">It
                  seems however, if I have raster data for all squares,
                  r.boxplot is working fine.</span><o:p></o:p></li>
              <li class="MsoListParagraph"
                style="margin-left:0cm;mso-list:l1 level1 lfo3"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">My
                  question: Is it possible to assign raster data for one
                  individual class/squares, of you have missing data for
                  other classes/squares?</span><o:p></o:p></li>
            </ol>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Kind
                regards</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Sibylle</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">First
                using this code here:</span><o:p></o:p></p>
            <p class="MsoNormal">v.to.rast
              input=Untersuchungsquadrate_2020_2024@PERMANENT
              output=Quadrate use=attr <span
                style="background:yellow;mso-highlight:yellow">attribute_column="ID_Quadrat"</span>
              label_column="ID_Quadrat"<o:p></o:p></p>
            <p class="MsoNormal"><span lang="DE-CH">r.boxplot -o
                input=U803174_abgeschnitten zones=Quadrate
                bx_sort=ascending raster_statistics=median</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"
                lang="DE-CH"> </span><o:p></o:p></p>
            <p class="MsoNormal"><img
                style="width:8.2812in;height:3.7083in"
                id="Picture_x0020_5"
                src="cid:part4.mEp8KLfr.Xkod9WNH@gmail.com" class=""
                width="795" height="356" border="0"><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Second
                using this code here:</span><o:p></o:p></p>
            <p class="MsoNormal">v.to.rast
              input=Untersuchungsquadrate_2020_2024@PERMANENT
              output=Quadrate use=attr <span
                style="background:yellow;mso-highlight:yellow">attribute_column=cat</span>
              label_column="ID_Quadrat"<o:p></o:p></p>
            <p class="MsoNormal"><span lang="DE-CH">r.boxplot -o
                input=U803174_abgeschnitten zones=Quadrate
                bx_sort=ascending raster_statistics=median</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"
                lang="DE-CH"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"
                lang="DE-CH"> </span><o:p></o:p></p>
            <p class="MsoNormal"><img
                style="width:10.375in;height:4.8854in"
                id="Picture_x0020_6"
                src="cid:part5.IVkTJrc0.nQDLmdSy@gmail.com" class=""
                width="996" height="469" border="0"><o:p></o:p></p>
            <div>
              <div
style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
                <p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <a
                      href="mailto:sibylle.stoeckli@gmx.ch"
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext">sibylle.stoeckli@gmx.ch</a>
                    <a href="mailto:sibylle.stoeckli@gmx.ch"
                      moz-do-not-send="true"><sibylle.stoeckli@gmx.ch></a>
                    <br>
                    <b>Sent:</b> Thursday, May 30, 2024 9:27 AM<br>
                    <b>To:</b> '<a
                      href="mailto:grass-user@lists.osgeo.org"
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a>'
                    <a href="mailto:grass-user@lists.osgeo.org"
                      moz-do-not-send="true"><grass-user@lists.osgeo.org></a><br>
                    <b>Subject:</b> RE: raster boxplots wrong assignment</span><o:p></o:p></p>
              </div>
            </div>
            <p class="MsoNormal"> <o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Dear
                community</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">I
                am still wondering, if the r.boxplot addon is working
                with just a limited number of areass/sites/regions?</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Kind
                regards</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Sibylle</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <div>
              <div
style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
                <p class="MsoNormal"><b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <a
                      href="mailto:sibylle.stoeckli@gmx.ch"
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext">sibylle.stoeckli@gmx.ch</a>
                    <<a href="mailto:sibylle.stoeckli@gmx.ch"
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext">sibylle.stoeckli@gmx.ch</a>>
                    <br>
                    <b>Sent:</b> Saturday, May 25, 2024 3:48 PM<br>
                    <b>To:</b> '<a
                      href="mailto:grass-user@lists.osgeo.org"
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a>'
                    <<a href="mailto:grass-user@lists.osgeo.org"
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a>><br>
                    <b>Subject:</b> raster boxplots wrong assignment</span><o:p></o:p></p>
              </div>
            </div>
            <p class="MsoNormal"> <o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"
                lang="DE-CH">Dear community</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"
                lang="DE-CH"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US">I
                would like to plot boxplots from a raster _<i>pres_apple_spring</i>_merged
                 for different 1 km2 squares (38 squares, Fig. 1, layer
                “Untersuchungsquadrate”). I was using the same code as
                used before for 12 regions:</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"><a
href="https://ecodiv.earth/post/drawing-boxplots-of-raster-values/"
                  moz-do-not-send="true" class="moz-txt-link-freetext">https://ecodiv.earth/post/drawing-boxplots-of-raster-values/</a>
                (Author Paulo van Breugel). All layers have the same
                projection (EPSG:2056, CH1903+/LV95).  However, when
                loading the layer squares (Untersuchungsquadrate) GRASS
                GIS was asking for reprojection.</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <ol style="margin-top:0cm" type="1" start="1">
              <li class="MsoPlainText" style="mso-list:l3 level1 lfo6">I
                got now a warning message, that I have a lot of
                categories, however, the modelling time was fast (Fig 2)<o:p></o:p></li>
              <li class="MsoPlainText" style="mso-list:l3 level1 lfo6">The
                error is now, that the boxplot is not showing all
                squares  (e.g. ID_Quadrat 803174) and the boxplots are
                assigned to the wrong square (ID_Quadrat) (Fig. 3)<o:p></o:p></li>
            </ol>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US">Kind
                regards</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US">Sibylle
                Stöckli</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US">Fig.
                1</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><img
                  style="width:6.9166in;height:3.625in"
                  id="Picture_x0020_1"
                  src="cid:part6.ykkEVGlS.CsxweC0U@gmail.com" class=""
                  width="664" height="348" border="0"></span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US">Fig.
                2</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><img
                  style="width:7.0416in;height:3.5in"
                  id="Picture_x0020_3"
                  src="cid:part7.thay3GNT.aHDkrjyA@gmail.com" class=""
                  width="676" height="336" border="0"></span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"
                lang="DE-CH"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"
                lang="DE-CH">Figure 3</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"
                lang="DE-CH"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><img
                  style="width:9.6354in;height:2.8645in"
                  id="Picture_x0020_2"
                  src="cid:part8.sRKJzUO5.2PK03M9R@gmail.com" class=""
                  width="925" height="275" border="0"></span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"
                lang="DE-CH"> </span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-ligatures:standardcontextual;mso-fareast-language:EN-US"
                lang="DE-CH"> </span><o:p></o:p></p>
            <p class="MsoNormal" style="margin-bottom:12.0pt"><br>
              <br>
              <o:p></o:p></p>
            <pre>_______________________________________________<o:p></o:p></pre>
            <pre>grass-user mailing list<o:p></o:p></pre>
            <pre><a href="mailto:grass-user@lists.osgeo.org"
            moz-do-not-send="true" class="moz-txt-link-freetext">grass-user@lists.osgeo.org</a><o:p></o:p></pre>
            <pre><a
            href="https://lists.osgeo.org/mailman/listinfo/grass-user"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/grass-user</a><o:p></o:p></pre>
          </blockquote>
          <pre>-- <o:p></o:p></pre>
          <pre>Micha Silver<o:p></o:p></pre>
          <pre>Ben Gurion Univ.<o:p></o:p></pre>
          <pre>Sde Boker, Remote Sensing Lab<o:p></o:p></pre>
          <pre>cell: +972-523-665918<o:p></o:p></pre>
        </blockquote>
        <pre>-- <o:p></o:p></pre>
        <pre>Micha Silver<o:p></o:p></pre>
        <pre>Ben Gurion Univ.<o:p></o:p></pre>
        <pre>Sde Boker, Remote Sensing Lab<o:p></o:p></pre>
        <pre>cell: +972-523-665918<o:p></o:p></pre>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918</pre>
  </body>
</html>