Last active
September 22, 2024 08:18
-
-
Save nakagami/568ac470d62c7483a4aff6ac8d6abd06 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo apt install imagemagick | |
# pip install matplotlib-backend-sixel matplotlib | |
import matplotlib | |
import matplotlib.pyplot as plt | |
import numpy as np | |
matplotlib.use('module://matplotlib-backend-sixel') | |
def plot(): | |
x = np.linspace(0, 1) | |
y = x**2 | |
plt.plot(x, y) | |
plt.show() | |
if __name__ == "__main__": | |
plot() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment