|  |  |  | # Simple plot of 1D data | 
|  |  |  | The example below demonstrates how to plot 1D data, precisely: | 
|  |  |  | ``` | 
|  |  |  | datadim                   1   # dimension of block size: 1=nx, 2=nx*ny, 3=nx*ny*nz | 
|  |  |  | ``` | 
|  |  |  |  | 
|  |  |  | The simple plotting script may look like: | 
|  |  |  | ```python | 
|  |  |  | #!/usr/bin/python3 | 
|  |  |  |  | 
|  |  |  | # Before run: | 
|  |  |  | # Get wata lib: | 
|  |  |  | #   pip3 install wdata | 
|  |  |  | # (add -U if you want to update) | 
|  |  |  | # For more info see: | 
|  |  |  | #   https://pypi.org/project/wdata/ | 
|  |  |  |  | 
|  |  |  |  | 
|  |  |  | import numpy as np | 
|  |  |  | import matplotlib.pyplot as plt | 
|  |  |  | from wdata.io import WData, Var | 
|  |  |  |  | 
|  |  |  | # I read data directly from dwarf, | 
|  |  |  | # Before running the script I mounted file system: | 
|  |  |  | # sshfs gabrielw@dwarf.if.pw.edu.pl:/home2/ /home/gabrielw/home2-dwarf/ | 
|  |  |  |  | 
|  |  |  | fwtxt="/home/gabrielw/home2-dwarf/scratch/barrus-gw/h1d/lambda006.wtxt" | 
|  |  |  | data = WData.load(fwtxt) | 
|  |  |  |  | 
|  |  |  | fig, ax = plt.subplots() | 
|  |  |  | ax.plot(data.xyz[0], data.rho_a[-1]) # plot last frame [-1] | 
|  |  |  |  | 
|  |  |  | ax.set(xlabel='x', ylabel=r'$n_{\uparrow}(x)$') | 
|  |  |  | ax.grid() | 
|  |  |  |  | 
|  |  |  | fig.savefig("rho_a.png") | 
|  |  |  | plt.show() | 
|  |  |  | ``` | 
|  |  |  | The result of this example: | 
|  |  |  |  | 
|  |  |  | \ No newline at end of file |