1

I wanted to ask about a problem that I can't find a solution to, I'm quite new to python and programming.

I have my code where I calculate different statistical measurements and in the fourth graph axes [1:1] I am trying to represent the standard deviation of my variable (accumulated daily rainfall in mm) but I have a problem and that is that the standard deviation represents values upwards and below average. Precipitation cannot have negative values and I wanted to know if it is possible to put some kind of filter so that only values equal to or greater than 0 are plotted.

Here I leave my example code and the data that I use

enter image description here

import numpy as np
import pandas as pd
from sklearn.datasets import load_iris
import seaborn as sns
from matplotlib import pyplot as plt

SALIDAS = 'C:/Users/ferfo/Desktop/' 

datos = pd.read_excel('C:/Users/ferfo/Desktop/Distribuciones/prueba.xlsx')
datos1 = pd.read_excel('C:/Users/ferfo/Desktop/Distribuciones/lineas.xlsx')
sns.set_style('darkgrid')


fig, axes =plt.subplots(2,2, figsize=(10,6))


sns.ecdfplot(ax=axes[0,0], data=datos)
sns.histplot(ax=axes[0,1], data=datos, fill = True,  common_norm=False, alpha=0.2, linewidth=2, element="step")
sns.lineplot(ax=axes[1,0], data=datos1, markers=True, dashes=False,)
sns.barplot(ax=axes[1,1], data=datos, ci = "sd", capsize=0.1, )


axes[0,0].set_ylabel("Probabilidad")
axes[0,0].set_xlabel("mm/día")
axes[0,0].set_ylim(0, 1.1)
axes[0,0].set_yticks([0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1])
axes[0,0].set_xticks([0,50,100,150,200,250,300,350])
axes[0,1].set_xticks([0,50,100,150,200,250,300,350])
axes[0,1].set_yticks([0,50,100,150,200,250,300,350,400,450,500])
axes[0,1].set_ylabel("Frecuencia")
axes[0,1].set_xlabel("mm/día")
axes[0,1].get_legend().remove()
axes[1,0].set_yticks([0,50,100,150,200,250,300])
axes[1,0].set_xlabel("Meses")
axes[1,0].set_ylabel("mm")
axes[1,0].get_legend().remove()
axes[1,0].set_xticks([1,3,5,8,11])
#axes[1,1].set_yticks([-10,30])
axes[1,1].set_xlabel("Producto")
#axes[1,1].set_ylabel("mm/día")

fig.suptitle('lomitas, 2001-2020', fontsize=20)

plt.show()

fig.savefig(SALIDAS + 'graficos', dpi=600, bbox_inches='tight')

prueba.txt

Observed data,Imerg data,Persiann Data
33.0,12.70423317,65.75
12.0,13.56632233,31.32
4.0,21.09570122,43.52
1.0,9.74461746,5.77
17.3,1.820376158,6.55
18.0,5.2507658,61.730003
2.0,8.476202965,14.250001
40.0,3.271785736,8.710001
1.0,9.8995018,25.009998
24.0,8.377342225,22.08
1.0,13.10612583,13.53
3.0,7.375349045,14.24
7.0,41.91541291,3.44
68.0,26.54439736,57.81
15.0,4.023840905,2.65
2.0,6.984012125,14.709999
50.0,13.24643517,2.61
35.0,2.314537525,62.61
22.0,4.787216664,47.95
23.0,6.563237665,80.09
41.0,26.61835861,2.73
52.5,87.12622835,35.05
21.0,20.77411652,4.5
5.0,39.9513588,2.77
21.3,34.07968521,46.68
4.0,4.571947575,2.94
21.0,7.785022735,11.190001
7.0,24.5557766,6.7700005
2.0,14.00565529,2.15
14.0,6.835758685,3.9299998
6.0,13.60206604,1.5
1.0,31.71725464,19.919998
7.0,3.962635517,33.16
20.2,1.291003466,12.959999
20.0,55.3718796,1.03
10.0,1.06314838,150.06
2.0,1.467782021,8.41
5.8,4.719767094,7.9300003
2.0,2.669240952,2.72
10.0,17.57000542,17.4
1.0,1.548810959,2.03
8.0,1.151179791,1.37
3.0,20.55989838,3.85
9.0,2.467414141,1.9200001
2.0,1.306825042,2.07
8.0,1.14,2.69
2.0,1.127427101,14.9800005
18.0,1.399605274,2.4500003
10.0,6.10573721,2.1100001
8.0,2.593387604,4.76
16.0,1.714526534,5.64
20.0,7.021852015,1.24
49.0,1.874579191,1.54
3.3,1.057072401,2.88
16.0,5.83480644,3.24
8.0,3.455219269,5.8599997
8.0,1.475891114,2.72
28.0,6.827443125,8.690001
13.0,18.33798981,2.26
4.0,6.57049513,4.49
2.0,31.0540371,1.25
35.0,53.7753334,1.3299999
11.0,21.80572129,2.3899999
6.5,34.6747551,3.56
33.0,1.931889653,2.33
13.0,12.64225388,3.62
5.0,8.975834845,2.33
37.0,1.71813643,15.01
8.0,4.632123471,5.06
16.0,20.17470742,1.51
11.0,27.08102036,3.59
2.0,2.386453629,4.99
1.0,1.059182048,1.5600001
21.0,26.59081078,4.0099998
2.0,12.13219738,7.1099997
45.0,1.741666675,3.78
11.0,1.191877246,2.83
8.0,1.437874556,4.38
36.0,4.313007832,1.56
23.0,43.39625931,2.3700001
1.0,4.652664662,1.39
44.8,2.123159409,7.83
2.0,1.013100386,4.0
4.0,3.444443941,5.9900002
3.0,1.029917956,1.6299999
3.0,64.20615385,1.46
14.0,2.552409411,1.75
15.0,1.070342303,22.1
20.0,19.51611519,14.44
34.0,11.814847,9.370001
20.0,3.378883601,31.640001
17.0,4.592389584,4.62
2.0,5.184751985,4.04
12.0,1.251710058,8.940001
31.0,1.20076859,20.54
3.0,2.656115532,16.52
12.0,3.296927929,22.5
11.0,6.101575375,8.24
37.0,1.621261239,16.720001
47.0,3.146972418,25.58
8.0,23.63509369,3.3600001
5.0,4.09155941,3.7999997
13.0,4.080201626,1.9300001
25.0,13.95099068,13.62
28.5,9.444846155,7.8
4.0,27.48032952,1.25
4.0,38.84066773,42.8
6.0,1.212481141,19.18
5.0,1.080495119,4.09
20.0,40.26078034,2.59
7.0,2.846819878,9.09
4.0,54.2149887,3.52
8.0,13.21701241,18.25
4.0,3.699003458,1.59
5.0,4.130330563,13.790001
5.0,20.58119202,6.25
5.0,6.42111683,4.21
44.0,4.309965134,1.56
10.0,4.79896164,2.24
3.0,7.026090145,1.5999999
3.0,2.08438778,6.4399996
3.0,25.36527062,3.0900002
22.0,24.76248741,23.900002
2.0,26.50693512,56.08
1.0,32.33215714,18.52
4.0,28.11775589,1.8699999
17.0,1.378523588,7.12
11.0,3.523523569,22.32
30.0,5.69707489,16.54
29.0,27.38665581,9.93
1.0,38.52075959,46.18
3.0,1.750359059,4.9399996
1.0,14.85701275,1.88
2.6,41.54547501,37.92
28.0,1.331750036,5.47
16.0,14.75776387,54.08
6.0,3.94290042,13.11
34.0,21.99007416,5.43
12.0,21.82343102,9.42
8.0,2.251169443,18.39
5.0,3.715127945,10.76
24.0,11.68067074,14.76
1.0,8.149575235,10.639999
9.0,3.602071047,11.530001
35.0,35.90866089,27.52
2.0,1.736975193,23.21
8.0,5.936116695,14.05
1.0,2.024060011,24.670002
3.0,7.263765335,21.99
14.0,1.832577467,12.419999
12.0,4.149312973,14.73
15.0,1.578367353,9.52
1.0,1.461082697,3.79
3.0,1.300221563,2.6699998
4.0,3.882947684,6.3
23.0,1.156816244,1.5699999
31.0,1.774330497,3.9099998
1.0,1.081079126,9.86
21.0,63.7815933,1.1
7.0,5.40561533,3.1
38.9,1.916676522,1.3499999
1.0,1.694874764,1.21
2.0,1.020053149,2.6799998
1.0,3.230535031,72.840004
18.0,2.468552113,3.8899999
47.0,2.557238341,1.9
3.0,2.99013114,3.03
1.0,1.321612239,1.81
15.0,11.32548142,1.2
5.0,1.680747986,1.92
2.0,4.724195004,3.9
1.0,3.12424779,2.5700002
1.0,19.96909905,11.53
2.4,38.93196869,1.54
3.0,6.141599655,1.24
2.0,10.2309351,2.06
2.2,1.496399522,1.99
3.0,14.13191891,4.8900003
3.0,6.556683065,2.02
1.0,2.044409514,1.8
7.0,13.88462162,6.32
2.0,2.669220686,2.21
4.0,9.125458715,1.6700001
1.0,5.971014975,4.23
2.0,24.87825394,8.09
40.0,4.818218708,4.5899997
1.0,1.526267767,22.439999
42.0,12.33635044,1.3199999
14.0,6.067589285,7.02
5.0,4.542275429,9.35
14.0,15.26683712,1.36
3.0,2.287184716,1.6099999
27.0,13.89541149,6.42
9.0,2.849863529,5.52
16.0,4.114969254,6.3199997
5.0,2.60952878,2.6299999
7.0,25.81751633,1.12
22.0,7.642860415,54.38
61.0,14.60452652,2.99
3.0,2.860728264,1.4300001
38.0,13.65011311,2.05
24.0,4.403223992,4.0699997
8.0,16.61255455,5.7299995
15.0,1.931255818,1.6700001
4.0,12.71534157,4.97
2.0,13.96313668,1.74
2.0,4.058600903,4.7799997
4.0,4.762280464,2.69
12.0,9.048459055,2.84
7.0,2.783326626,2.87
24.0,2.251889944,5.2999997
17.0,12.83441448,4.16
29.0,11.20629025,1.34
37.0,28.90879059,1.22
4.0,1.714102268,23.29
2.0,1.729247093,1.87
7.0,11.54702091,102.02
14.0,1.603832722,1.26
4.0,48.88271332,3.4900002
5.0,3.357400656,1.33
9.0,26.58070755,1.3499999
7.0,1.279444337,11.709999
52.0,7.07122135,6.92
21.0,4.065811158,1.55
8.0,1.305071712,3.3400002
2.0,33.32134629,34.989998
1.0,25.21928978,5.46
1.0,7.68272543,3.69
8.0,4.058069229,12.27
14.0,1.392273307,31.66
27.0,1.614271045,2.51
1.0,1.43,24.939999
5.0,1.564941883,2.76
1.0,5.490926745,19.510002
2.0,2.741349459,8.51
4.0,1.820300937,7.93
7.0,1.200169325,9.7
27.0,1.227725864,3.3899999
53.0,1.409593702,1.26
13.0,1.020598889,11.91
2.0,1.532613397,10.45
6.0,2.150630713,51.839996
2.0,9.32765293,1.0999999
3.0,3.207234144,27.57
32.0,1.102299214,36.58
4.0,11.28597355,9.549999
1.0,32.67594147,2.3
5.0,17.2740078,15.48
42.0,3.444516182,6.82
10.0,2.200684548,7.47
2.0,42.5202179,30.38
6.0,1.706894517,21.759998
2.0,14.07932759,18.81
11.0,4.025928021,9.6
25.0,16.11277199,2.11
17.0,6.93875265,1.03
9.0,4.846222401,10.18
31.3,1.64617455,6.8199997
18.0,1.422170997,14.7
3.0,2.14275384,16.5
42.0,20.2088604,4.75
28.0,16.17591286,24.34
113.5,1.768956781,5.91
27.0,7.651679995,13.950001
16.0,62.23706435,1.66
40.0,3.120871783,9.92
5.0,1.11462462,1.3499999
25.0,17.13158798,31.470001
1.0,35.90638352,3.34
1.0,11.49289704,30.420002
2.0,1.723016501,3.0900002
7.0,1.727642894,1.8199999
62.5,15.11504936,3.46
15.0,12.78649616,15.449999
6.0,1.142826557,2.9
2.0,4.31261921,1.44
2.0,19.54297829,1.8
5.0,21.42444229,1.17
9.0,1.985171438,5.24
4.0,38.83046723,1.53
3.0,24.3289547,2.63
28.0,21.55071259,8.26
3.0,20.35590744,5.58
18.5,17.1479969,20.69
1.0,2.328164578,6.65
77.0,6.90966034,1.5999999
3.0,8.87460327,4.1
6.0,19.85622978,5.88
18.0,11.50050545,8.62
1.0,2.399034024,4.4399996
13.0,17.8201561,7.3199997
1.0,63.47223665,5.11
5.0,10.70358849,1.9399999
4.0,1.303659797,1.14
5.0,7.051344395,1.2
2.0,1.317322851,2.83
2.0,1.153054357,20.35
1.7,1.288836599,1.0
3.5,6.40096426,2.18
4.7,10.61519242,3.25
2.0,38.07836151,1.4499999
1.0,1.00505364,1.06
5.0,4.601175309,14.140001
13.0,1.059544564,1.11
50.0,1.025045872,1.08
2.4,2.140906573,24.24
5.0,11.28417015,6.04
2.8,1.706882835,1.6299999
15.5,63.1325226,5.55
17.0,5.925836565,2.69
3.0,1.94356668,5.5099998
4.5,9.45316124,12.35
36.0,2.504364014,1.73
1.0,1.470301152,2.85
1.0,1.242533088,3.36
12.1,1.670167685,3.0299997
5.0,57.5176239,1.06
15.0,1.107224822,3.8200002
5.0,3.0542202,6.79
3.0,2.898064137,4.32
7.0,30.05044174,1.75
3.0,3.427459955,1.1800001
4.0,4.624752045,1.04
2.0,11.62128449,1.5600001
8.0,6.490193845,3.7
2.0,1.937290669,2.6000001
7.0,8.65875244,1.4100001
52.0,1.299692512,1.69
5.0,1.855275035,48.739998
1.0,3.769208908,7.24
7.6,4.55385828,6.29
3.5,6.51372051,1.71
1.3,8.0854969,1.21
22.2,1.507522464,109.61
22.5,9.14739609,8.1
7.5,27.17226029,6.6499996
2.0,32.79916382,6.2500005
1.0,1.280574084,1.05
3.5,26.51655007,1.08
2.5,2.701778889,3.1100001
1.0,5.269325735,2.01
8.0,30.63650131,1.4300001
20.0,71.78442385,27.51
32.0,1.373457909,28.66
3.0,12.21031952,21.530003
61.0,35.02967835,2.9800003
7.0,14.67937184,4.88
3.5,4.434751988,2.06
2.0,11.85890293,6.34
35.0,25.02809716,3.44
11.0,3.947379113,21.65
4.5,3.420857191,6.13
31.0,2.146751881,47.380005
2.0,21.10358238,82.47
15.0,2.37749362,6.38
38.0,11.68755818,2.21
6.0,2.17284298,63.430004
21.0,7.695138455,60.98
3.0,11.97859764,30.349998
2.0,14.64129257,1.68
6.0,5.88892269,4.81
13.0,1.734639526,24.029999
5.0,4.035034657,23.36
1.7,1.285043836,1.87
1.5,1.238770008,24.31
5.5,19.83879471,2.27
9.2,4.221150399,10.42
8.0,23.05646897,13.280001
2.0,1.394252658,17.740002
16.0,7.788359165,2.06
4.0,6.4100194,21.4
16.0,67.55716705,11.23
21.0,1.351992965,61.07
5.0,5.084335325,45.9
12.0,12.95212364,4.08
23.0,25.68342018,4.21
6.0,1.988664508,9.7
3.0,3.016326189,10.969999
8.0,2.866974354,25.95
1.0,2.696616888,2.54
1.0,1.581075788,2.5
41.0,2.780577898,4.09
8.0,1.417200446,26.240002
4.0,1.385309816,7.45
10.5,7.5372777,12.17
16.0,7.932168005,69.51
18.0,1.451128483,10.07
11.0,1.840451598,3.63
17.0,1.065397263,2.3
26.0,4.893643856,2.9599998
1.0,1.452208638,2.23
19.0,37.93759156,3.18
4.0,12.90710354,5.83
37.0,6.14060068,1.39
16.4,8.097572325,3.87
5.4,23.57411003,1.8499999
1.0,6.214107035,11.530001
2.9,6.978374005,1.76
5.5,43.03276825,2.3600001
1.0,1.466169358,6.4300003
1.0,1.140809417,3.33
21.5,1.293450475,10.71
7.6,3.49955225,2.32
2.0,14.28147984,1.7900001
1.0,3.699310303,34.33
12.0,4.277731419,2.23
45.0,5.301327705,1.99
69.2,7.982951165,10.09
8.6,3.936149597,10.08
1.0,1.424581647,2.6699998
9.2,4.491571904,46.879997
17.5,2.771928311,1.0
20.0,9.17326832,4.99
3.1,2.072081805,1.12
7.0,5.55553627,1.27
32.7,14.50772381,2.66
26.0,2.33113885,2.65
2.5,5.78749275,48.21
27.3,11.18823529,5.89
49.5,5.236501695,17.56
2.5,7.31285858,8.110001
24.0,1.520752192,1.1600001
9.7,9.462599755,1.9200001
1.6,20.17654228,1.72
3.0,10.11459542,4.84
8.6,27.88303757,4.3
21.0,12.77318192,1.93
1.5,1.652448058,2.9099998
2.3,2.164780855,5.19
1.2,5.11115074,2.9099998
3.1,4.954486847,6.77
4.9,1.114153981,2.13
1.0,2.178640366,2.49
3.8,3.012405396,33.73
22.8,51.1032982,36.66
65.5,11.25961972,72.69
3.0,6.713029385,5.6
14.2,2.496469736,3.9700003
4.0,12.115098,37.68
9.3,2.551826239,2.21
18.2,14.48979855,3.06
24.0,7.24518347,1.51
1.3,21.97145844,79.93
11.3,5.81929302,29.16
2.0,35.17000199,1.5
2.0,21.69516754,10.809999
17.9,8.1897316,2.9
15.0,15.60975838,28.07
33.0,3.585752011,17.85
18.1,7.03698683,26.3
1.0,15.85383892,1.96
5.0,8.665060045,20.49
10.0,5.237526895,7.74
3.0,9.37757492,8.4
11.0,2.525708676,1.0699999
33.0,1.059689999,6.8199997
5.0,1.390462637,62.05
9.0,2.451468468,2.9699998
42.0,1.846368075,12.53
3.0,1.235369563,23.34
3.0,1.421132684,1.9200001
5.0,1.591700435,18.150002
21.0,1.431996823,8.74
3.0,3.120195151,3.44
4.0,10.05565357,9.03
3.0,1.057814002,14.1
22.0,8.63092613,5.19
45.0,11.97591305,42.8
24.0,1.507814646,13.559999
34.0,6.692327025,48.93
8.0,2.86255455,3.81
24.0,3.043321371,25.85
8.5,3.122832775,23.18
1.5,11.90790558,13.000001
9.3,8.271219255,110.89
3.0,14.87175751,5.38
3.5,47.65599442,14.65
11.7,6.447260855,4.29
2.5,16.07569123,8.72
7.0,6.27013159,12.32
3.5,35.76211167,6.0299997
6.0,26.0370102,4.59
1.8,6.6210227,2.03
14.5,6.33511257,1.05
2.5,32.02148819,3.72
5.1,1.203332901,1.84
11.3,11.10483933,1.02
5.3,3.092888594,5.2300005
14.0,41.64496613,3.4299998
4.0,9.58962822,5.64
20.0,1.257387281,4.42
18.0,16.84815598,1.6800001
15.0,15.92509461,3.3799999
5.0,39.24178314,1.0400001
12.0,28.16544533,2.4299998
7.5,4.047671795,5.16
2.0,2.273884535,1.99
11.0,8.58615303,5.0
27.7,22.31294441,1.3499999
2.0,9.67351246,1.05
6.0,17.06152153,2.33
3.0,9.642523765,23.4
25.5,1.165874005,27.91
35.0,11.69623184,52.79
47.0,38.67126847,3.86
2.3,61.18006515,1.7
1.0,7.492923735,1.53
13.5,12.18782616,2.0900002
10.0,17.36215019,10.040001
16.2,9.499432565,2.15
26.0,9.225958825,46.11
1.3,39.28028488,2.56
7.6,3.471356869,1.97
8.5,8.659394265,9.45
17.0,4.660372734,10.440001
36.0,61.9743538,3.2599998
21.7,12.09271908,3.6699998
47.0,24.33893013,4.51
21.0,6.91462612,3.37
27.0,2.297224999,1.51
5.0,1.394450546,1.3599999
5.0,16.00174332,3.46
2.0,14.10092736,11.889999
4.0,22.22217942,1.04
9.0,67.13967135,31.410002
6.0,4.184929371,1.4599999
4.0,6.180713175,19.4
2.0,3.645504713,6.21
5.0,24.17942238,5.4
1.0,11.77395439,11.450001
6.0,16.84624863,5.58
2.0,9.62325859,10.45
6.0,16.02267838,11.73
21.0,13.3161335,6.73
16.0,1.80894053,3.33
4.0,5.394687655,48.8
5.0,24.77208328,17.82
7.0,17.31050492,5.4999995
4.0,9.31569481,96.34
2.0,11.5558157,9.599999
45.0,21.96049881,12.68
34.0,1.795776129,12.01
3.0,4.568071366,2.1299999
64.0,8.809449195,6.38
28.0,17.17154122,14.49
8.0,3.798393965,6.1900005
2.0,3.239580393,14.32
23.0,7.43819666,2.98
3.0,2.554473639,6.05
2.0,7.20397377,3.35
24.0,21.64646912,1.23
28.0,6.8011055,1.65
27.0,51.22446825,1.71
53.0,2.336632967,3.22
14.0,1.857179165,14.05
3.0,3.921233416,14.67
2.0,8.250204085,6.05
33.0,36.43959427,4.37
3.0,35.4586258,2.12
5.0,2.924695492,2.04
17.0,3.519897938,6.7200003
18.0,57.69216535,20.48
11.0,6.79311371,8.83
4.0,2.43661356,10.25
37.0,5.926236155,1.97
2.0,2.30543375,1.2900001
18.0,21.94180298,10.57
1.0,21.24626732,36.19
7.0,4.31278801,3.73
1.0,6.77379656,5.2799997
2.0,5.612919805,17.69
10.0,5.471610545,1.8199999
3.0,5.3090024,2.59
15.0,2.189461708,24.79
20.0,4.415833473,9.45
33.0,2.321558237,9.4
3.0,5.695771215,3.13
44.0,13.87459469,14.059999
14.0,2.366339445,3.52
2.0,3.329537154,5.53
3.0,1.751751542,32.37
4.0,7.689642905,10.49
4.0,1.51193893,1.35
2.0,1.155116558,1.42
1.0,1.199524403,61.78
10.0,3.710379839,7.83
5.0,1.770510078,4.82
10.0,1.905061603,30.7
8.0,5.34256077,27.550001
23.0,1.739247799,76.08
34.0,38.56280136,32.3
1.0,6.42942953,3.15
1.0,11.48092175,62.170002
39.0,2.078872204,3.92
11.0,19.59555435,10.219999
6.0,6.19163275,43.309998
4.0,5.939269065,1.3
3.0,22.87758637,10.98
3.0,2.864192009,1.45
7.0,48.72347641,21.2
8.0,3.442718983,89.59
2.0,7.616796495,10.110001
1.0,2.508226633,2.96
5.0,6.681570055,75.770004
44.0,2.179568291,1.4200001
3.0,2.951803446,10.48
4.0,1.397823572,11.66
9.0,6.152549745,20.35
13.0,44.06642151,1.47
30.0,16.16477585,22.18
2.0,3.826816082,3.3700001
8.0,3.112096072,13.259999
1.0,6.575606345,1.8900001
17.0,1.482020021,48.0
10.0,2.736569643,4.2
21.0,2.932685614,4.33
43.0,9.989481925,1.64
6.0,13.08501339,21.89
28.0,2.157101155,2.53
12.0,1.35453558,132.59
18.0,21.74938965,87.01001
18.0,1.661110401,4.1499996
58.0,2.03024149,2.05
8.0,2.228796006,25.630001
3.0,2.194865465,7.07
29.0,7.931626795,32.85
5.0,7.26604271,17.970001
47.0,20.16017533,56.81
9.0,2.508003474,39.64
22.0,18.76267052,1.51
15.0,23.55038834,20.79
51.0,20.85602761,2.28
64.0,16.18298722,15.879999
2.0,37.16973496,2.93
6.8,10.7100668,1.7
2.0,2.656838179,6.0299997
1.7,8.5988245,4.49
8.8,3.148923874,5.21
4.0,1.364438057,5.59
2.0,2.821480751,2.04
10.0,8.46378422,6.04
20.0,2.713042021,17.470001
3.0,5.70679426,9.54
16.0,1.062875986,1.95
16.0,2.508112192,1.48
10.0,13.24829483,3.1599998
9.0,13.35315609,2.73
86.0,10.60771466,5.7699995
2.0,9.02454853,5.65
5.0,25.73985863,2.47
20.5,8.04908943,1.76
45.0,8.649107935,3.13
6.0,3.438475371,2.8000002
30.0,3.145784617,2.54
11.5,5.690588475,1.6
1.2,3.900574684,3.15
7.0,1.642292857,7.9700003
19.2,95.4910965,3.49
11.0,22.3479023,1.03
5.0,8.625390055,3.28
14.0,17.87278557,1.72
3.0,51.85173415,4.2599998
9.0,9.86716366,1.42
10.0,1.725934148,1.38
7.0,7.497133255,1.32
5.0,36.0772171,2.27
7.0,1.681801677,3.58
22.0,33.22405243,2.79
9.0,1.467683554,4.44
30.0,13.11451245,12.830001
3.0,14.44763184,1.38
3.0,19.91684342,9.0
10.0,41.07674408,37.51
27.0,21.05844116,29.219997
46.0,1.294272781,17.66
9.0,8.95629406,3.35
82.0,2.58863163,2.27
83.0,11.92989922,4.4
15.0,43.7828598,10.33
41.0,7.786485195,1.0600001
13.0,7.31237173,7.79
6.0,1.55503273,1.54
17.0,6.330646515,8.16
29.0,1.532290578,26.54
94.0,30.26382637,34.27
6.0,9.99059868,8.91
43.0,20.92362976,37.43
2.0,1.524400234,30.09
29.0,2.260905266,15.21
61.0,26.32531929,18.919998
11.0,2.334921837,32.82
9.0,9.19584751,59.58
15.0,2.663776636,14.78
28.0,1.73086071,1.3199999
21.0,1.000801564,2.01
7.0,7.184841155,11.57
1.0,16.885458,2.44
1.0,9.996009825,11.049999
11.0,29.07500458,4.76
7.0,28.82209015,1.02
3.0,4.637232781,3.1100001
2.0,2.153310299,30.399998
1.0,2.010419369,45.55
8.0,26.56690979,2.47
16.0,1.144513488,4.73
21.0,1.671649695,6.7600007
3.0,1.65417099,8.87
5.0,4.671144009,5.95
27.0,2.909118414,3.32
4.0,8.24102974,13.8
4.0,2.693380595,14.49
21.0,3.064752341,7.7699995
2.0,8.33625126,1.2
23.0,24.75660515,21.239998
15.0,14.11971665,104.16
107.0,4.368866444,2.97
30.0,3.136216641,1.24
7.0,1.182296515,1.54
19.0,2.363009453,6.37
24.0,67.74961855,7.33
30.0,5.13684225,1.66
24.0,4.606848717,1.3800001
18.0,6.117928505,1.06
15.0,7.6142869,1.75
11.0,7.933288095,3.62
2.0,4.611485005,12.22
73.0,2.199810028,5.0099998
32.0,29.52713013,2.47
10.0,1.146588326,12.360001
2.0,2.026584387,1.8199999
11.0,1.142000914,4.53
57.0,11.43570423,12.92
7.0,43.80160141,1.77
10.0,1.085262776,13.07
7.0,2.720019579,7.9700003
49.0,3.989929915,5.35
2.0,2.600961924,1.08
4.0,6.558179855,1.35
3.0,9.41394329,3.7799997
2.0,6.647725105,5.58
1.0,38.19209671,4.21
5.0,4.519927502,5.95
18.0,3.880130053,1.11
9.0,1.045809627,1.53
37.0,2.701902867,1.0
4.0,6.56444454,1.44
5.0,3.529962302,4.21
25.0,19.17519951,2.39
7.0,1.562627673,1.54
1.0,39.37012863,2.31
12.0,16.47767449,1.9499999
1.0,58.903965,5.2200003
1.0,16.95523072,1.9
9.0,3.100278616,2.21
12.0,45.80677033,1.0699999
4.0,26.81613541,1.35
1.0,3.593140841,2.04
5.0,1.917018533,14.929999
28.0,2.88641119,5.74
2.0,34.33824539,3.42
2.0,2.267287493,11.120001
19.0,7.366959095,2.5
10.0,70.9339676,2.44
9.0,19.76496125,1.34
4.0,2.355486632,5.45
1.0,4.309099198,8.219999
1.0,2.074670315,13.22
2.0,1.886642456,2.85
14.0,40.44182587,2.05
5.0,32.99110413,23.02
5.0,1.268943787,6.58
4.0,2.145960093,1.3
5.0,1.39419365,2.2
20.0,1.174509287,1.18
11.0,2.198520899,14.9800005
6.0,2.230074644,19.82
6.0,6.072119235,1.45
1.0,4.664021969,3.4100003
4.0,2.227411747,3.12
7.0,2.113803625,16.439999
14.0,6.688260555,6.2200003
39.0,1.226664901,2.26
21.0,3.213046551,21.76
40.0,1.002687574,6.41
30.0,1.483391285,43.269997
7.0,13.00875283,7.74
6.0,2.928070784,2.54
6.0,31.15128517,21.2
15.0,9.223342895,13.26
17.0,59.55508805,1.42
16.0,1.27139616,5.62
42.0,2.204371214,5.0699997
2.0,2.447686196,2.46
4.0,14.17787552,35.41
4.0,43.20114517,3.27
5.0,36.44638825,21.529999
10.0,14.93710041,41.4
8.0,8.20574093,1.4200001
12.0,1.637166262,5.71
33.0,1.203313589,3.8300002
41.0,21.69332695,32.79
25.0,4.260479927,21.29
9.0,2.558784724,38.98
25.0,3.04798007,5.02
4.0,3.111752034,31.34
4.0,6.786047935,24.27
7.0,8.4459219,4.18
26.0,11.70038319,31.630001
51.0,3.495490313,1.24
5.0,4.241265774,1.4
11.0,4.8981843,7.13
13.0,9.211686135,2.54
50.0,12.39083863,8.24
19.0,9.209892275,9.120001
83.0,2.324657202,10.95
23.0,9.65412903,9.49
21.0,31.06323052,2.95
38.0,1.128272534,1.1
1.0,2.512983084,1.8299999
5.0,16.3822918,1.3
3.0,11.90946579,1.63
6.0,7.08117676,1.01
2.0,19.39507294,2.15
15.0,19.04957772,1.14
5.0,53.11849215,4.01
25.0,42.92922592,1.77
6.0,14.9218731,1.3599999
1.0,21.0775013,1.72
6.0,32.00092316,1.38
5.0,1.04565537,1.4200001
11.0,12.34065342,1.53
8.0,39.12719345,2.82
20.0,21.81253624,1.4
2.0,33.09275818,2.6599998
6.0,1.996003509,2.35
4.0,10.73557759,9.23
20.0,3.835647583,1.13
3.0,11.55557251,1.18
18.0,58.3459854,2.71
2.0,63.196373,1.76
2.0,3.220089197,2.6799998
20.0,23.93250275,2.54
38.0,2.286283016,7.25
2.0,1.07400322,11.82
2.0,59.8628502,2.29
30.0,2.739398718,3.05
3.0,23.52008248,10.07
2.0,7.707740785,2.71
8.0,10.88557053,1.12
12.0,2.47727871,17.189999
10.0,6.07909584,2.24
9.0,3.649833203,1.7700001
4.0,32.12921524,2.2399998
19.0,1.531433821,1.25
22.0,1.535874009,1.23
11.0,1.569700599,9.17
42.0,2.108448267,6.5999994
11.0,77.33182525,2.2
8.0,3.344490767,1.5899999
4.0,9.55613613,3.1
10.0,4.887585163,9.41
18.0,35.29027939,1.22
2.0,2.152896881,2.17
25.0,2.639908314,6.58
7.0,1.753674388,22.89
2.0,37.65769196,22.029999
10.0,2.503957987,4.27
19.0,2.736332894,2.92
2.0,2.734235764,4.6400003
5.0,34.71192932,30.09
2.0,79.5751724,22.71
28.0,15.41206646,1.74
1.0,30.84560204,20.79
1.0,1.311088205,75.11
3.0,24.92964554,2.2
22.0,29.93969918,27.46
5.0,27.75062371,26.349998
3.0,31.69940377,30.82
1.0,3.944314957,2.4499998
2.0,1.557312489,50.29
13.0,1.235749007,4.5899997
3.0,12.3859272,42.89
6.5,38.85156632,2.64
17.0,6.500573635,12.950001
13.0,38.20243073,60.57
6.0,22.09395218,46.91
5.0,29.17655945,15.75
10.0,1.43235457,6.68
6.0,4.367777825,10.860001
40.0,5.10657072,17.16
20.0,12.44417382,5.5600004
15.0,1.133333683,20.51
2.0,2.290113449,4.52
2.0,59.1026268,37.29
1.0,8.303461075,8.29
2.0,1.454311133,12.51
1.0,6.68616104,14.710001
4.0,1.05869627,1.99
3.0,7.288159845,9.14
19.0,4.696534157,2.97
11.0,1.543948889,61.05
16.0,1.902146697,11.7
4.0,10.61460114,8.91
4.0,10.18768692,1.16
4.0,11.54320431,5.18
15.0,4.913286686,3.13
7.0,4.915909291,1.14
5.0,1.031675935,9.58
7.0,3.898350954,29.689999
35.0,34.91336441,6.7200003
17.0,18.01113892,5.75
2.0,2.833272219,13.74
28.0,5.176920415,6.09
5.0,16.68647957,7.79
9.0,9.293769835,17.48
15.0,4.145808697,1.03
5.0,19.18017769,36.120003
29.0,2.869644404,5.0299997
25.0,7.71194124,1.3900001
21.0,1.118057967,4.15
4.0,1.011766196,1.24
3.0,4.288121224,1.59
15.0,18.01800728,11.950001
17.0,2.095095396,4.27
21.0,5.09799528,1.21
4.0,3.605466366,2.26
5.0,4.272053242,1.4399999
20.0,1.356512428,1.71
19.0,4.395007611,3.11
2.0,16.10503197,2.2400002
59.0,8.85128689,2.54
2.0,3.780042649,2.44
18.0,25.41714287,2.6
21.0,18.50357628,2.6100001
23.0,12.17268467,9.51
12.0,1.71827972,1.46
20.0,1.340227962,4.1
10.0,4.668937683,2.88
4.0,1.653563857,13.76
3.0,11.45629502,2.8600001
40.0,23.80907822,3.53
4.0,8.023687365,1.54
25.0,13.02610493,10.79
2.0,10.09106159,3.98
40.0,1.432140589,1.05
36.0,49.78308106,1.5999999
31.0,25.32273484,28.27
4.0,10.05254841,1.79
25.0,12.45585251,4.94
25.0,7.96915245,3.36
16.0,4.125425816,5.0299997
2.0,17.35515785,7.01
20.0,2.154047728,43.85
15.0,1.133311153,1.3599999
20.0,6.99955845,3.4099998
25.0,7.06923151,13.52
9.0,2.061743498,11.83
6.0,15.1108923,5.86
6.0,3.659174204,8.83
21.0,25.09469795,63.71
12.0,12.78966046,1.03
7.0,3.70449996,4.68
2.0,81.32299805,1.62
10.0,1.47226286,2.44
11.0,1.767955542,4.1099997
9.0,14.35262299,4.1800003
2.0,26.53904343,7.3300004
7.0,29.06570626,1.6500001
10.0,1.977015496,24.59
3.0,4.072252751,29.779999
4.0,56.03784945,74.07
29.0,50.3431473,14.5
2.0,2.982461214,1.08
1.0,1.07741952,3.1200001
2.0,23.38036537,10.590001
1.0,19.09048653,55.350002
1.0,41.51933289,5.07
1.0,5.85829115,1.5
3.0,81.27360535,6.6
16.0,7.64243841,4.65
2.0,32.28141022,13.530001
40.0,2.746798277,7.29
3.0,1.134368301,1.86
1.0,1.18452096,1.29
4.0,11.01940632,14.890001
44.0,2.367835284,45.96
6.0,9.290693285,8.3
13.0,6.92009163,1.75
10.0,12.8741827,5.77
5.0,7.534250735,2.24
21.0,14.394454,1.32
20.0,6.47271347,1.48
12.0,1.485815168,1.3
29.0,1.470686913,2.6499999
46.0,2.631582499,13.61
22.0,3.658107281,1.3499999
8.0,3.507339239,2.4399998
11.0,9.38621521,1.08
21.0,1.363355041,5.6800003
2.0,2.211771965,2.9899998
Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
  • As show, the `'sd'` errorbar is the mean ± the standard deviation. Your data has a large standard deviation, which is why the error bar goes into the negatives. If you do not want the full errorbar, they you should manually plot a vertical line on the bars instead. The vertical bar would start at the median of each bar, and it's length would be that of the standard deviation. This [answer](https://stackoverflow.com/a/64035939/7758804) shows how to add a vertical line to a plot. – Trenton McKinney Oct 24 '22 at 21:04
  • it's very common to represent precipitation as a lognormal distribution or another type of distribution which does not allow negative values (a zero-inflated lognormal is another). Using distributions like these, you could plot `ln(precip)`, where the standard deviation could span zero without an issue. But if you're treating precip as normal, the distribution will have nonzero probability over negative values. that's not python's fault - that's just how normal distributions work. – Michael Delgado Oct 24 '22 at 21:09
  • [This answer](https://stackoverflow.com/questions/58221687/seaborn-barplot-with-error-bars-only-in-one-direction) might help – jylls Oct 24 '22 at 21:11
  • but to your specific technical question - you can use the [`ax.bxp`](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.bxp.html) method to draw boxplots with predefined statistics, and you could manipulate the whiskers to constrain them to be ≥ 0 if you'd like prior to plotting – Michael Delgado Oct 24 '22 at 21:11
  • Additionally, the bar length shown is the `'mean'` of the values. `estimator='mean'`. Also, your seaborn is out of date and should be updated. Use `sns.boxplot` instead of `sns.barplot`. – Trenton McKinney Oct 24 '22 at 21:17

0 Answers0