- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to Plot Complex Numbers in Python?
You can plot complex numbers on a polar plot. If you have an array of complex numbers, you can plot it using:
import matplotlib.pyplot as plt import numpy as np cnums = np.arange(5) + 1j * np.arange(6,11) X = [x.real for x in cnums] Y = [x.imag for x in cnums] plt.scatter(X,Y, color='red') plt.show()
This will plot a graph of the numbers in a complex plane.
Advertisements