Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Broadcasting with NumPy Arrays Plotting a two-dimensional function Example

# welcome to softhunt.net
import numpy as np
import matplotlib.pyplot as plt

# Computes x and y coordinates for
# points on sine and cosine curves
x = np.arange(0, 3 * np.pi, 0.1)
y_sin = np.sin(x)
y_cos = np.cos(x)

# Plot the points using matplotlib
plt.plot(x, y_sin)
plt.plot(x, y_cos)
plt.xlabel('x axis label')
plt.ylabel('y axis label')
plt.title('Sine and Cosine')
plt.legend(['Sine', 'Cosine'])

plt.show()
Comment

PREVIOUS NEXT
Code Example
Python :: Python NumPy atleast_3d Function Example when inputs are high dimesion 
Python :: Python NumPy atleast_1d Function Syntax 
Python :: Python NumPy rollaxis Function Syntax 
Python :: Python NumPy ravel function example array.ravel is equivalent to reshape(-1, order=order) 
Python :: run all pycharm jupyter notebook 
Python :: display colors in python console 
Python :: youtube-dl python not found 
Python :: python generate string of length 
Python :: Python NumPy asfortranarray Function Tuple to an array 
Python :: Python NumPy block Function Example by using np.eye function 
Python :: First CGI program 
Python :: Python NumPy insert Function Example Working with Scalars 
Python :: como saber si un string es un numero python 
Python :: Python __ne__ 
Python :: sorting a specific row python 
Python :: else clause in for loop python 
Python :: NumPy bitwise_xor Code When inputs are Boolean 
Python :: drop column 0 to many 
Python :: opensource ip tracker python 
Python :: penggunaan values di python 
Python :: how to do alignment of fasta in biopython 
Python :: python tkinter.ttk combobox down event on mouseclick 
Python :: wpapi 
Python :: seaborn colorbar labelsize 
Python :: django insert data into database without form 
Python :: python pandas to visualise the tangent of a curve 
Python :: python regex with f-string 
Python :: ring Sort List Item 
Python :: z3 symbolic expressions cannot be cast to concrete boolean values 
Python :: StandardScaler sklearn get params normalization 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =