Skip to content

Instantly share code, notes, and snippets.

@nakagami
Last active September 22, 2024 08:18
Show Gist options
  • Save nakagami/568ac470d62c7483a4aff6ac8d6abd06 to your computer and use it in GitHub Desktop.
Save nakagami/568ac470d62c7483a4aff6ac8d6abd06 to your computer and use it in GitHub Desktop.
# 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