What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-17 06:25:01
matplotlib embedded in tkinter
# Creates simple Graph embedded in tkinter import tkinter from tkinter import * import numpy as np from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2Tk from matplotlib.figure import Figure tkFenster = Tk() tkFenster.geom... Add solution -
Other 2022-03-16 23:45:06
Three-dimensional Points and Lines
ax = plt.axes(projection='3d') # Data for a three-dimensional line zline = np.linspace(0, 15, 1000) xline = np.sin(zline) yline = np.cos(zline) ax.plot3D(xline, yline, zline, 'gray') # Data for three-dimensional scattered points zdata = 15 * np.random.r... Add solution -
-
Python 2022-03-02 12:20:01
significant figures on axes plot matplotlib
import matplotlib.pyplot as plt import numpy as np from matplotlib.ticker import FormatStrFormatter fig, ax = plt.subplots() ax.yaxis.set_major_formatter(FormatStrFormatter('%g')) ax.yaxis.set_ticks(np.arange(-2, 2, 0.25)) x = np.arange(-1, 1, 0.1) plt... Add solution -
Python 2022-02-20 10:35:20
change figure size pandas
df['column_name'].plot(figsize=(15, 10)) Add solution -
Python 2022-02-18 01:55:03
how to map longitude and latitude in python
from shapely.geometry import Point import geopandas as gpd from geopandas import GeoDataFrame df = pd.read_csv("Long_Lats.csv", delimiter=',', skiprows=0, low_memory=False) geometry = [Point(xy) for xy in zip(df['Longitude'], df['Latitude'])] ... Add solution