Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pyplot simple plot

import matplotlib.pyplot as plt 
    
# x axis values 
x = [1,2,3] 
# corresponding y axis values 
y = [2,4,1] 
    
# plotting the points  
plt.plot(x, y) 
    
# naming the x axis 
plt.xlabel('x - axis') 
# naming the y axis 
plt.ylabel('y - axis') 
    
# giving a title to my graph 
plt.title('My first graph!') 
    
# function to show the plot 
plt.show() 
Comment

simple plt plot

# simple plt graph

import matplotlib.pyplot as plt
import numpy as np

# Data for plotting
t = np.arange(0.0, 2.0, 0.01)
s = 1 + np.sin(2 * np.pi * t)

fig, ax = plt.subplots()
ax.plot(t, s)

ax.set(xlabel='time (s)', ylabel='voltage (mV)',
       title='About as simple as it gets, folks')
ax.grid()

plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: get current scene file name godot 
Python :: discord api python putting ids in a list 
Python :: print items of list using list comprehension in python 
Python :: wavelet transform in machine learning 
Python :: how to kill python process started by excel 
Python :: mayeutica 
Python :: File "main.py", line 21 print("total harga:idr", bakso bulat +str Minuman Drink): ^ SyntaxError: invalid syntax 
Python :: john cabot 
Python :: In is_lodes_form( : Missing id-axis pairings. 
Python :: how to count categories in a csv command line 
Python :: python enforcing class variables in subclass 
Python :: python char to hex 
Python :: tkinter yt downloader with resolution 
Python :: bolumden kalan python 
Shell :: install git on amazon linux 
Shell :: pacman remove unused dependencies 
Shell :: npm change registry 
Shell :: how to remove spacevim 
Shell :: install git-lfs ubuntu 18.04 
Shell :: kill app at port 
Shell :: remove google chrome linux 
Shell :: AppImages require FUSE to run. 
Shell :: flush dns cmd 
Shell :: npm ERR! Maximum call stack size exceeded ubuntu 
Shell :: conda install xlrd 
Shell :: conda install git 
Shell :: brew reinstall mysql 
Shell :: conda install transformers 
Shell :: Could not find OpenSSL. Install an OpenSSL development package or 
Shell :: @mui/lab install 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =