Symbolic math¶
go to console by clicking the + button and install it with
https://docs.sympy.org/latest/tutorials/intro-tutorial/intro.html
In [1]:
! pip install sympy
Requirement already satisfied: sympy in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (1.14.0) Requirement already satisfied: mpmath<1.4,>=1.1.0 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from sympy) (1.3.0)
In [2]:
import sympy
In [3]:
sympy.sqrt(3)
Out[3]:
$\displaystyle \sqrt{3}$
In [4]:
from sympy import symbols
numeric python¶
go to console by clicking the + button and install it with
In [5]:
! pip install numpy
Requirement already satisfied: numpy in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (2.3.5)
In [6]:
import numpy
Mathplotlib¶
go to console by clicking the + button and install it with
https://matplotlib.org/stable/tutorials/pyplot.html#sphx-glr-tutorials-pyplot-py
In [7]:
! pip install matplotlib
#! conda install matplotlib -y
Requirement already satisfied: matplotlib in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (3.10.7)
Requirement already satisfied: contourpy>=1.0.1 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib) (1.3.3)
Requirement already satisfied: cycler>=0.10 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib) (4.60.1)
Requirement already satisfied: kiwisolver>=1.3.1 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib) (1.4.9)
Requirement already satisfied: numpy>=1.23 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib) (2.3.5)
Requirement already satisfied: packaging>=20.0 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib) (25.0)
Requirement already satisfied: pillow>=8 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib) (12.0.0)
Requirement already satisfied: pyparsing>=3 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib) (3.2.5)
Requirement already satisfied: python-dateutil>=2.7 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib) (2.9.0.post0)
Requirement already satisfied: six>=1.5 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib) (1.17.0)
Channels:
- conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 25.7.0
latest version: 25.9.1
Please update conda by running
$ conda update -n base -c conda-forge conda
## Package Plan ##
environment location: /home/k/miniforge3/envs/ROOT5
added / updated specs:
- matplotlib
The following packages will be downloaded:
package | build
---------------------------|-----------------
brotli-1.2.0 | h41a2e66_0 19 KB conda-forge
brotli-bin-1.2.0 | hf2c8021_0 21 KB conda-forge
contourpy-1.3.3 | py311hdf67eae_3 289 KB conda-forge
fonttools-4.60.1 | py311h3778330_0 2.8 MB conda-forge
kiwisolver-1.4.9 | py311h724c32c_2 77 KB conda-forge
libbrotlicommon-1.2.0 | h09219d5_0 78 KB conda-forge
libbrotlidec-1.2.0 | hd53d788_0 34 KB conda-forge
libbrotlienc-1.2.0 | h02bd7ab_0 291 KB conda-forge
libclang-cpp21.1-21.1.0 |default_h99862b1_1 20.2 MB conda-forge
matplotlib-3.10.8 | py311h38be061_0 17 KB conda-forge
matplotlib-base-3.10.8 | py311h0f3be63_0 7.9 MB conda-forge
pillow-12.0.0 | py311h07c5bb8_0 1020 KB conda-forge
pyside6-6.9.2 | py311h72d58bf_1 9.7 MB conda-forge
qt6-main-6.9.2 | h5bd77bc_1 50.0 MB conda-forge
unicodedata2-17.0.0 | py311h49ec1c0_1 399 KB conda-forge
------------------------------------------------------------
Total: 92.7 MB
The following NEW packages will be INSTALLED:
alsa-lib conda-forge/linux-64::alsa-lib-1.2.14-hb9d3cd8_0
brotli conda-forge/linux-64::brotli-1.2.0-h41a2e66_0
brotli-bin conda-forge/linux-64::brotli-bin-1.2.0-hf2c8021_0
contourpy conda-forge/linux-64::contourpy-1.3.3-py311hdf67eae_3
cycler conda-forge/noarch::cycler-0.12.1-pyhd8ed1ab_1
cyrus-sasl conda-forge/linux-64::cyrus-sasl-2.1.28-hd9c7081_0
double-conversion conda-forge/linux-64::double-conversion-3.3.1-h5888daf_0
fonttools conda-forge/linux-64::fonttools-4.60.1-py311h3778330_0
kiwisolver conda-forge/linux-64::kiwisolver-1.4.9-py311h724c32c_2
lcms2 conda-forge/linux-64::lcms2-2.17-h717163a_0
libbrotlicommon conda-forge/linux-64::libbrotlicommon-1.2.0-h09219d5_0
libbrotlidec conda-forge/linux-64::libbrotlidec-1.2.0-hd53d788_0
libbrotlienc conda-forge/linux-64::libbrotlienc-1.2.0-h02bd7ab_0
libclang-cpp21.1 conda-forge/linux-64::libclang-cpp21.1-21.1.0-default_h99862b1_1
libclang13 conda-forge/linux-64::libclang13-21.1.0-default_h746c552_1
libllvm21 conda-forge/linux-64::libllvm21-21.1.0-hecd9e04_0
libntlm conda-forge/linux-64::libntlm-1.8-hb9d3cd8_0
libpq conda-forge/linux-64::libpq-17.7-h5c52fec_1
libxslt conda-forge/linux-64::libxslt-1.1.43-h7a3aeb2_0
matplotlib conda-forge/linux-64::matplotlib-3.10.8-py311h38be061_0
matplotlib-base conda-forge/linux-64::matplotlib-base-3.10.8-py311h0f3be63_0
munkres conda-forge/noarch::munkres-1.1.4-pyhd8ed1ab_1
openjpeg conda-forge/linux-64::openjpeg-2.5.4-h55fea9a_0
openldap conda-forge/linux-64::openldap-2.6.10-he970967_0
pillow conda-forge/linux-64::pillow-12.0.0-py311h07c5bb8_0
pyparsing conda-forge/noarch::pyparsing-3.2.5-pyhcf101f3_0
pyside6 conda-forge/linux-64::pyside6-6.9.2-py311h72d58bf_1
qhull conda-forge/linux-64::qhull-2020.2-h434a139_5
qt6-main conda-forge/linux-64::qt6-main-6.9.2-h5bd77bc_1
unicodedata2 conda-forge/linux-64::unicodedata2-17.0.0-py311h49ec1c0_1
xcb-util conda-forge/linux-64::xcb-util-0.4.1-h4f16b4b_2
xcb-util-cursor conda-forge/linux-64::xcb-util-cursor-0.1.6-hb03c661_0
xcb-util-image conda-forge/linux-64::xcb-util-image-0.4.0-hb711507_2
xcb-util-keysyms conda-forge/linux-64::xcb-util-keysyms-0.4.1-hb711507_0
xcb-util-renderut~ conda-forge/linux-64::xcb-util-renderutil-0.3.10-hb711507_0
xcb-util-wm conda-forge/linux-64::xcb-util-wm-0.4.2-hb711507_0
zlib-ng conda-forge/linux-64::zlib-ng-2.2.5-hde8ca8f_0
Downloading and Extracting Packages:
qt6-main-6.9.2 | 50.0 MB | | 0%
libclang-cpp21.1-21. | 20.2 MB | | 0%
pyside6-6.9.2 | 9.7 MB | | 0%
matplotlib-base-3.10 | 7.9 MB | | 0%
fonttools-4.60.1 | 2.8 MB | | 0%
pillow-12.0.0 | 1020 KB | | 0%
unicodedata2-17.0.0 | 399 KB | | 0%
libbrotlienc-1.2.0 | 291 KB | | 0%
contourpy-1.3.3 | 289 KB | | 0%
libbrotlicommon-1.2. | 78 KB | | 0%
kiwisolver-1.4.9 | 77 KB | | 0%
libbrotlidec-1.2.0 | 34 KB | | 0%
brotli-bin-1.2.0 | 21 KB | | 0%
brotli-1.2.0 | 19 KB | | 0%
matplotlib-3.10.8 | 17 KB | | 0%
libclang-cpp21.1-21. | 20.2 MB | | 0%
matplotlib-base-3.10 | 7.9 MB | | 0%
fonttools-4.60.1 | 2.8 MB | 2 | 1%
qt6-main-6.9.2 | 50.0 MB | | 0%
libclang-cpp21.1-21. | 20.2 MB | 4 | 1%
matplotlib-base-3.10 | 7.9 MB | 8 | 2%
fonttools-4.60.1 | 2.8 MB | ## | 6%
qt6-main-6.9.2 | 50.0 MB | | 0%
libclang-cpp21.1-21. | 20.2 MB | 6 | 2%
matplotlib-base-3.10 | 7.9 MB | #6 | 4%
fonttools-4.60.1 | 2.8 MB | #####9 | 16%
qt6-main-6.9.2 | 50.0 MB | 4 | 1%
matplotlib-base-3.10 | 7.9 MB | #####7 | 16%
libclang-cpp21.1-21. | 20.2 MB | #8 | 5%
qt6-main-6.9.2 | 50.0 MB | 6 | 2%
fonttools-4.60.1 | 2.8 MB | ##########9 | 30%
libclang-cpp21.1-21. | 20.2 MB | ##4 | 7%
fonttools-4.60.1 | 2.8 MB | #############3 | 36%
qt6-main-6.9.2 | 50.0 MB | 8 | 2%
matplotlib-base-3.10 | 7.9 MB | #######7 | 21%
libclang-cpp21.1-21. | 20.2 MB | ###1 | 8%
qt6-main-6.9.2 | 50.0 MB | #6 | 4%
pyside6-6.9.2 | 9.7 MB | ###4 | 9%
matplotlib-base-3.10 | 7.9 MB | ##############5 | 39%
libclang-cpp21.1-21. | 20.2 MB | #####7 | 15%
qt6-main-6.9.2 | 50.0 MB | ##1 | 6%
pyside6-6.9.2 | 9.7 MB | ####5 | 12%
matplotlib-base-3.10 | 7.9 MB | ###################2 | 52%
pyside6-6.9.2 | 9.7 MB | #####3 | 15%
qt6-main-6.9.2 | 50.0 MB | ##5 | 7%
matplotlib-base-3.10 | 7.9 MB | ######################6 | 61%
qt6-main-6.9.2 | 50.0 MB | ### | 8%
libclang-cpp21.1-21. | 20.2 MB | #######8 | 21%
matplotlib-base-3.10 | 7.9 MB | #########################7 | 70%
fonttools-4.60.1 | 2.8 MB | ##################################### | 100%
fonttools-4.60.1 | 2.8 MB | ##################################### | 100%
pyside6-6.9.2 | 9.7 MB | ###### | 16%
qt6-main-6.9.2 | 50.0 MB | ###4 | 9%
matplotlib-base-3.10 | 7.9 MB | #############################6 | 80%
pyside6-6.9.2 | 9.7 MB | #######5 | 20%
qt6-main-6.9.2 | 50.0 MB | #### | 11%
libclang-cpp21.1-21. | 20.2 MB | #########6 | 26%
pyside6-6.9.2 | 9.7 MB | ########3 | 23%
matplotlib-base-3.10 | 7.9 MB | #################################5 | 91%
qt6-main-6.9.2 | 50.0 MB | ####5 | 12%
pillow-12.0.0 | 1020 KB | ###################1 | 52%
libclang-cpp21.1-21. | 20.2 MB | ##########9 | 29%
qt6-main-6.9.2 | 50.0 MB | ####9 | 13%
libclang-cpp21.1-21. | 20.2 MB | ###########9 | 32%
qt6-main-6.9.2 | 50.0 MB | #####3 | 15%
libclang-cpp21.1-21. | 20.2 MB | ############# | 35%
pyside6-6.9.2 | 9.7 MB | ###########8 | 32%
pillow-12.0.0 | 1020 KB | ##################################### | 100%
qt6-main-6.9.2 | 50.0 MB | #####8 | 16%
libclang-cpp21.1-21. | 20.2 MB | ############## | 38%
pyside6-6.9.2 | 9.7 MB | ############# | 35%
qt6-main-6.9.2 | 50.0 MB | ######2 | 17%
libclang-cpp21.1-21. | 20.2 MB | ###############1 | 41%
pyside6-6.9.2 | 9.7 MB | ##############2 | 38%
qt6-main-6.9.2 | 50.0 MB | ######8 | 18%
libclang-cpp21.1-21. | 20.2 MB | ################1 | 44%
pyside6-6.9.2 | 9.7 MB | ###############5 | 42%
qt6-main-6.9.2 | 50.0 MB | #######2 | 20%
libclang-cpp21.1-21. | 20.2 MB | #################1 | 46%
pyside6-6.9.2 | 9.7 MB | ################# | 46%
qt6-main-6.9.2 | 50.0 MB | #######7 | 21%
pyside6-6.9.2 | 9.7 MB | ##################2 | 49%
qt6-main-6.9.2 | 50.0 MB | ########1 | 22%
libbrotlienc-1.2.0 | 291 KB | ##################################5 | 93%
pyside6-6.9.2 | 9.7 MB | ###################7 | 53%
libclang-cpp21.1-21. | 20.2 MB | ################### | 51%
qt6-main-6.9.2 | 50.0 MB | ########6 | 23%
libclang-cpp21.1-21. | 20.2 MB | ###################8 | 54%
qt6-main-6.9.2 | 50.0 MB | #########1 | 25%
contourpy-1.3.3 | 289 KB | ## | 6%
libclang-cpp21.1-21. | 20.2 MB | ####################9 | 57%
qt6-main-6.9.2 | 50.0 MB | #########5 | 26%
libclang-cpp21.1-21. | 20.2 MB | #####################9 | 59%
unicodedata2-17.0.0 | 399 KB | ##################################### | 100%
matplotlib-base-3.10 | 7.9 MB | ##################################### | 100%
matplotlib-base-3.10 | 7.9 MB | ##################################### | 100%
contourpy-1.3.3 | 289 KB | ####################################8 | 100%
qt6-main-6.9.2 | 50.0 MB | ########## | 27%
libclang-cpp21.1-21. | 20.2 MB | ######################8 | 62%
contourpy-1.3.3 | 289 KB | ##################################### | 100%
qt6-main-6.9.2 | 50.0 MB | ##########4 | 28%
libbrotlicommon-1.2. | 78 KB | #######6 | 21%
libclang-cpp21.1-21. | 20.2 MB | #######################8 | 65%
qt6-main-6.9.2 | 50.0 MB | ##########8 | 29%
pyside6-6.9.2 | 9.7 MB | ###########################6 | 75%
libbrotlicommon-1.2. | 78 KB | ##################################### | 100%
libclang-cpp21.1-21. | 20.2 MB | ########################9 | 67%
libbrotlicommon-1.2. | 78 KB | ##################################### | 100%
qt6-main-6.9.2 | 50.0 MB | ###########3 | 31%
pyside6-6.9.2 | 9.7 MB | #############################2 | 79%
libclang-cpp21.1-21. | 20.2 MB | ########################## | 70%
libbrotlidec-1.2.0 | 34 KB | #################5 | 48%
brotli-bin-1.2.0 | 21 KB | ############################8 | 78%
libbrotlidec-1.2.0 | 34 KB | ##################################### | 100%
libbrotlienc-1.2.0 | 291 KB | ##################################### | 100%
brotli-bin-1.2.0 | 21 KB | ##################################### | 100%
qt6-main-6.9.2 | 50.0 MB | ###########7 | 32%
libclang-cpp21.1-21. | 20.2 MB | ###########################1 | 73%
brotli-1.2.0 | 19 KB | ##############################3 | 82%
matplotlib-3.10.8 | 17 KB | ##################################6 | 94%
brotli-1.2.0 | 19 KB | ##################################### | 100%
qt6-main-6.9.2 | 50.0 MB | ############1 | 33%
matplotlib-3.10.8 | 17 KB | ##################################### | 100%
libclang-cpp21.1-21. | 20.2 MB | ############################1 | 76%
qt6-main-6.9.2 | 50.0 MB | #############1 | 35%
qt6-main-6.9.2 | 50.0 MB | #############6 | 37%
qt6-main-6.9.2 | 50.0 MB | ############## | 38%
qt6-main-6.9.2 | 50.0 MB | ##############5 | 39%
qt6-main-6.9.2 | 50.0 MB | ##############9 | 41%
qt6-main-6.9.2 | 50.0 MB | ###############4 | 42%
qt6-main-6.9.2 | 50.0 MB | ###################3 | 52%
qt6-main-6.9.2 | 50.0 MB | #####################5 | 58%
qt6-main-6.9.2 | 50.0 MB | #########################7 | 70%
qt6-main-6.9.2 | 50.0 MB | ###########################4 | 74%
qt6-main-6.9.2 | 50.0 MB | ############################ | 76%
qt6-main-6.9.2 | 50.0 MB | ############################5 | 77%
kiwisolver-1.4.9 | 77 KB | ##################################### | 100%
qt6-main-6.9.2 | 50.0 MB | #############################9 | 81%
libbrotlidec-1.2.0 | 34 KB | ##################################### | 100%
qt6-main-6.9.2 | 50.0 MB | ###############################3 | 85%
brotli-bin-1.2.0 | 21 KB | ##################################### | 100%
qt6-main-6.9.2 | 50.0 MB | ################################8 | 89%
brotli-1.2.0 | 19 KB | ##################################### | 100%
qt6-main-6.9.2 | 50.0 MB | ##################################2 | 92%
matplotlib-3.10.8 | 17 KB | ##################################### | 100%
qt6-main-6.9.2 | 50.0 MB | ####################################4 | 99%
qt6-main-6.9.2 | 50.0 MB | ##################################### | 100%
matplotlib-base-3.10 | 7.9 MB | ##################################### | 100%
pyside6-6.9.2 | 9.7 MB | ##################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
In [8]:
import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.ylabel('some numbers')
plt.show()
In [9]:
! pip install scipy
Requirement already satisfied: scipy in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (1.16.3) Requirement already satisfied: numpy<2.6,>=1.25.2 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from scipy) (2.3.5)
In [12]:
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
! pip install ipympl
#! conda install ipympl -y
#%matplotlib widget
Requirement already satisfied: ipympl in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (0.9.8) Requirement already satisfied: ipython<10 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipympl) (9.6.0) Requirement already satisfied: ipywidgets<9,>=7.6.0 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipympl) (8.1.8) Requirement already satisfied: matplotlib<4,>=3.5.0 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipympl) (3.10.8) Requirement already satisfied: numpy in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipympl) (2.3.5) Requirement already satisfied: pillow in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipympl) (12.0.0) Requirement already satisfied: traitlets<6 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipympl) (5.14.3) Requirement already satisfied: decorator in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipython<10->ipympl) (5.2.1) Requirement already satisfied: ipython-pygments-lexers in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipython<10->ipympl) (1.1.1) Requirement already satisfied: jedi>=0.16 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipython<10->ipympl) (0.19.2) Requirement already satisfied: matplotlib-inline in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipython<10->ipympl) (0.2.1) Requirement already satisfied: pexpect>4.3 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipython<10->ipympl) (4.9.0) Requirement already satisfied: prompt_toolkit<3.1.0,>=3.0.41 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipython<10->ipympl) (3.0.52) Requirement already satisfied: pygments>=2.4.0 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipython<10->ipympl) (2.19.2) Requirement already satisfied: stack_data in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipython<10->ipympl) (0.6.3) Requirement already satisfied: typing_extensions>=4.6 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipython<10->ipympl) (4.15.0) Requirement already satisfied: comm>=0.1.3 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipywidgets<9,>=7.6.0->ipympl) (0.2.3) Requirement already satisfied: widgetsnbextension~=4.0.14 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipywidgets<9,>=7.6.0->ipympl) (4.0.15) Requirement already satisfied: jupyterlab_widgets~=3.0.15 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from ipywidgets<9,>=7.6.0->ipympl) (3.0.16) Requirement already satisfied: contourpy>=1.0.1 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib<4,>=3.5.0->ipympl) (1.3.3) Requirement already satisfied: cycler>=0.10 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib<4,>=3.5.0->ipympl) (0.12.1) Requirement already satisfied: fonttools>=4.22.0 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib<4,>=3.5.0->ipympl) (4.60.1) Requirement already satisfied: kiwisolver>=1.3.1 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib<4,>=3.5.0->ipympl) (1.4.9) Requirement already satisfied: packaging>=20.0 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib<4,>=3.5.0->ipympl) (25.0) Requirement already satisfied: pyparsing>=3 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib<4,>=3.5.0->ipympl) (3.2.5) Requirement already satisfied: python-dateutil>=2.7 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from matplotlib<4,>=3.5.0->ipympl) (2.9.0.post0) Requirement already satisfied: wcwidth in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from prompt_toolkit<3.1.0,>=3.0.41->ipython<10->ipympl) (0.2.14) Requirement already satisfied: parso<0.9.0,>=0.8.4 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from jedi>=0.16->ipython<10->ipympl) (0.8.5) Requirement already satisfied: ptyprocess>=0.5 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from pexpect>4.3->ipython<10->ipympl) (0.7.0) Requirement already satisfied: six>=1.5 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from python-dateutil>=2.7->matplotlib<4,>=3.5.0->ipympl) (1.17.0) Requirement already satisfied: executing>=1.2.0 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from stack_data->ipython<10->ipympl) (2.2.1) Requirement already satisfied: asttokens>=2.1.0 in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from stack_data->ipython<10->ipympl) (3.0.1) Requirement already satisfied: pure_eval in /home/k/miniforge3/envs/ROOT5/lib/python3.11/site-packages (from stack_data->ipython<10->ipympl) (0.2.3)
In [13]:
# Generating random data
np.random.seed(42)
x = np.random.randint(0, 100, size=100)
y = np.random.randint(0, 100, size=100)
z = np.random.randint(0, 100, size=100)
# Creating a 3D scatter plot
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(x, y, z, c='r', marker='o')
ax.set_xlabel('X Label')
ax.set_ylabel('Y Label')
ax.set_zlabel('Z Label')
plt.show()
In [14]:
# diese Zelle durch Eingabe von <shift>+<return> ausführen
## allgemein nützliche Einstellungen und Pakete
# Grafiken im Notebook anzeigen
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
In [15]:
# diese Zelle durch Eingabe von <shift>+<return> ausführen
# erstes Beispiel
# ---------------
# Felder mit Datenpunkten erzeugen
x = np.linspace(-20., 20., 200)
y = np.sin(x)
# Abbildung erzeugen
plt.plot(x,y)
# Abbildung darstellen
plt.show()