Skip to content

Instantly share code, notes, and snippets.

import numpy as np
import matplotlib.pyplot as plt
def motion(event):
x = event.xdata
y = event.ydata
if (x is None) or (y is None):
return
ln.set_data(x,y)
print('(x,y) = (%.2f,%.2f)' % (x,y))
import numpy as np
import matplotlib.pyplot as plt
def motion(event):
x = event.xdata
y = event.ydata
if (x is None) or (y is None):
return
ln.set_data(x,y)
print('(x,y) = (%.2f,%.2f)' % (x,y))
import numpy as np
import matplotlib.pyplot as plt
def motion(event):
x = event.xdata
y = event.ydata
if (x is None) or (y is None):
return
ln.set_data(x,y)
print('(x,y) = (%.2f,%.2f)' % (x,y))
import numpy as np
import matplotlib.pyplot as plt
def motion(event):
x = event.xdata
y = event.ydata
if (x is None) or (y is None):
return
ln.set_data(x,y)
print('(x,y) = (%.2f,%.2f)' % (x,y))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from scipy.integrate import odeint
def Lorenz(X,t):
x, y, z = X
dx = -σ * x + σ * y
dy = ρ * x - y - x * z
dz = -β * z + x * y
using Plots; gr();
ENV["PLOTS_TEST"] = "true"
using IntervalArithmetic
N = 27
x0 = @interval(0.11)
x0_sol = 0.11
f(x) = 4*x*(1-x)
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
clist=[(1,1,1),(1,0,0)]
cm = LinearSegmentedColormap.from_list('wr',clist)
plt.register_cmap(cmap=cm)
clist=[(0,0,1),(1,1,1)]
import numpy as np
import matplotlib.pyplot as plt
import sympy as sb
# カラーバー用
from mpl_toolkits.axes_grid1 import make_axes_locatable
# フォントサイズ
plt.rcParams["font.size"] = 10
import numpy as np
import matplotlib.pyplot as plt
import sympy as sb
from scipy import integrate
plt.rcParams["font.size"] = 10
# 複素変数
z = sb.Symbol('z')