🤖
Artificial Intelligence for Idiot
  • Introduction
  • What is Machine Learning
  • Python Basics
    • Random Number
  • Data Manipulation
    • Numpy
    • Pandas
  • Data Visualization
    • Matplotlib
      • Simple drawing
      • Simple line and point
      • Any line and label
      • Annotation in reality
  • Dataset Searching
  • Keras
    • Data preparation
    • Build the simplest model
  • Robot
    • Speech to Text
Powered by GitBook
On this page

Was this helpful?

  1. Data Visualization
  2. Matplotlib

Simple line and point

PreviousSimple drawingNextAny line and label

Last updated 6 years ago

Was this helpful?

import pylab
import numpy as np

# draw x^2
x = np.linspace(-5, 5) 
y = np.power(x, 2)
pylab.plot(x, y, '-k')

# draw a point
pylab.plot(2, 4, 'bo')

pylab.show()