What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-06 15:17:01
matplotlib legend out of plot
import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 20, 1000) y1 = np.sin(x) y2 = np.cos(x) plt.plot(x, y1, "-b", label="sine") plt.plot(x, y2, "-r", label="cosine") plt.legend(loc="upper le... Add solution -
Python 2021-09-06 03:39:01
python tkinter plot points
from tkinter import * from tkinter.ttk import * import matplotlib matplotlib.use("TkAgg") from matplotlib.figure import Figure from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg root = Tk() figure = Figure(figsize=(5, 4), dpi=10... Add solution -
Other 2021-09-05 10:54:02
how to read jason file in jupyter notebook
import numpy as np import pandas as pd import seaborn as sns import matplotlib as plt import json %matplotlib inline with open("pud.json") as datafile: data = json.load(datafile) dataframe = pd.DataFrame(data) Add solution -
Python 2021-09-05 07:54:02
position of legend matplotlib
import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 20, 1000) y1 = np.sin(x) y2 = np.cos(x) plt.plot(x, y1, "-b", label="sine") plt.plot(x, y2, "-r", label="cosine") plt.legend(loc="upper le... Add solution -
Python 2021-09-04 16:06:01
make pandas dataframe from elasticsearch
from datetime import datetime from elasticsearch import Elasticsearch from pandas import DataFrame, Series import pandas as pd import matplotlib.pyplot as plt es = Elasticsearch(host="192.168.121.252") res = es.search(index="_all", doc... Add solution