diff --git a/parameter-learning_nd_disc/untitled1.py b/parameter-learning_nd_disc/untitled1.py deleted file mode 100644 index b4e04c5..0000000 --- a/parameter-learning_nd_disc/untitled1.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -""" -Created on Fri May 4 11:01:50 2018 - -@author: root -""" -""" -Demonstrate the mixing of 2d and 3d subplots -""" -from mpl_toolkits.mplot3d import Axes3D -import matplotlib.pyplot as plt -import numpy as np - -print(len(np.zeros((3,4)))) - -def f(t): - s1 = np.cos(2*np.pi*t) - e1 = np.exp(-t) - return np.multiply(s1, e1) - - -################ -# First subplot -################ -t1 = np.arange(0.0, 5.0, 0.1) -t2 = np.arange(0.0, 5.0, 0.02) -t3 = np.arange(0.0, 2.0, 0.01) - -# Twice as tall as it is wide. -fig = plt.figure(figsize=plt.figaspect(2.)) -fig.suptitle('A tale of 2 subplots') -ax = fig.add_subplot(2, 1, 1) -l = ax.plot(t1, f(t1), 'bo', - t2, f(t2), 'k--', markerfacecolor='green') -ax.grid(True) -ax.set_ylabel('Damped oscillation') - - -################# -# Second subplot -################# -ax = fig.add_subplot(2, 1, 2, projection='3d') -X = np.arange(-5, 5, 0.25) -xlen = len(X) -Y = np.arange(-5, 5, 0.25) -ylen = len(Y) -X, Y = np.meshgrid(X, Y) -R = np.sqrt(X**2 + Y**2) -Z = np.sin(R) - -surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, - linewidth=0, antialiased=False) -print(X.shape, Z.shape) -ax.set_zlim3d(-1, 1) - -plt.show()