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
# -*- coding: utf-8 -*- | |
# AWS cloud9 | |
import matplotlib | |
matplotlib.use("Agg") | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
from matplotlib.offsetbox import OffsetImage, AnnotationBbox | |
plt.rcParams["font.size"] = 16 |
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
# -*- coding: utf-8 -*- | |
# AWS cloud9 | |
import matplotlib | |
matplotlib.use("Agg") | |
import matplotlib.pyplot as plt | |
from scipy.optimize import curve_fit | |
import numpy as np | |
x_data = np.linspace(-10, 10, 20) |
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
from mpl_toolkits.mplot3d import axes3d | |
import matplotlib.pyplot as plt | |
from IPython.display import HTML | |
import matplotlib.animation as animation | |
fig = plt.figure() | |
ax = fig.add_subplot(111, projection='3d') | |
# load some test data for demonstration and plot a wireframe | |
X, Y, Z = axes3d.get_test_data(0.1) |
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
#picture scatter plot | |
%matplotlib inline | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from matplotlib.offsetbox import OffsetImage, AnnotationBbox | |
def imscatter(x, y, image, ax=None, zoom=1): | |
if ax is None: | |
ax = plt.gca() | |
try: |
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
%matplotlib inline | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from matplotlib.offsetbox import OffsetImage, AnnotationBbox | |
from IPython.display import HTML | |
from matplotlib.animation import FuncAnimation | |
fig, ax = plt.subplots(figsize=(16,9)) | |
image = 'cactus7.png' | |
image = plt.imread(image) |
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
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
from IPython.display import HTML | |
def init(): | |
ax.set_ylim(-1.1, 1.1) | |
ax.set_xlim(0, 10) | |
del xdata[:] | |
del ydata[:] |
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
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
from IPython.display import HTML | |
from scipy.stats import norm | |
fig, ax = plt.subplots() | |
def update(num,x,y,locs,lines): | |
if len(lines) > 0: |
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
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
from IPython.display import HTML | |
from scipy.stats import norm | |
fig, ax = plt.subplots() | |
def update(num,x,y,scales,lines): | |
if len(lines) > 0: |
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
import numpy as np | |
#配列の形状変換 | |
x=np.linspace(0,5,6) | |
""" | |
array([0., 1., 2., 3., 4., 5.]) | |
""" | |
x.reshape((3,2)) | |
""" |
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
#配列の出力 | |
import numpy as np | |
x=np.linspace(1,6,6) | |
""" | |
array([1., 2., 3., 4., 5., 6.]) | |
""" | |
y=np.zeros(6) | |
""" | |
array([0., 0., 0., 0., 0., 0.]) |
OlderNewer