ASCII plotting


In [1]:
from physt import examples
from physt import plotting
plotting.set_default_backend("ascii")

import numpy as np
np.random.seed(42)

In [2]:
examples.normal_h1().plot()


-3.92e+00 - -3.14e+00  [  10]  ▏
-3.14e+00 - -2.35e+00  [  88]  █▎
-2.35e+00 - -1.57e+00  [ 485]  ██████▉
-1.57e+00 - -7.83e-01  [1605]  ██████████████████████▋
-7.83e-01 - +1.92e-03  [2831]  ███████████████████████████████████████▉
+1.92e-03 - +7.87e-01  [2844]  ████████████████████████████████████████
+7.87e-01 - +1.57e+00  [1543]  █████████████████████▊
+1.57e+00 - +2.36e+00  [ 498]  ███████
+2.36e+00 - +3.14e+00  [  88]  █▎
+3.14e+00 - +3.93e+00  [   8]  ▏

In [3]:
plotting.ascii.ENABLE_ASCIIPLOTLIB = False
examples.normal_h1().plot(show_values=True)


 13
# 143
##### 680
################# 2160
########################## 3223
#################### 2482
######## 1059
## 213
 25
 2

In [4]:
examples.normal_h2().plot(cmap='Greys_r')


      3.69 →
+----------+
||3.73 ↑
||
||
||
||
||
||
||
||
||-4.47 ↓
+----------+
← -3.66

↓ 0

       843 ↑