Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
Project: test
Views: 91872# -*- coding: utf-8 -*-1"""2Created on Tue May 27 21:21:19 201434@author: rlabbe5"""6import matplotlib.pyplot as plt789def show_fixed_lag_numberline():10fig = plt.figure()11ax = fig.add_subplot(111)12ax.set_xlim(0,10)13ax.set_ylim(0,10)1415# draw lines16xmin = 117xmax = 918y = 519height = 12021plt.hlines(y, xmin, xmax)22plt.vlines(xmin, y - height / 2., y + height / 2.)23plt.vlines(4.5, y - height / 2., y + height / 2.)24plt.vlines(6, y - height / 2., y + height / 2.)25plt.vlines(xmax, y - height / 2., y + height / 2.)26plt.vlines(xmax-1, y - height / 2., y + height / 2.)2728# add numbers29plt.text(xmin, y-1.1, '$x_0$', fontsize=20, horizontalalignment='center')30plt.text(xmax, y-1.1, '$x_k$', fontsize=20, horizontalalignment='center')31plt.text(xmax-1, y-1.1, '$x_{k-1}$', fontsize=20, horizontalalignment='center')32plt.text(4.5, y-1.1, '$x_{k-N+1}$', fontsize=20, horizontalalignment='center')33plt.text(6, y-1.1, '$x_{k-N+2}$', fontsize=20, horizontalalignment='center')34plt.text(2.7, y-1.1, '.....', fontsize=20, horizontalalignment='center')35plt.text(7.2, y-1.1, '.....', fontsize=20, horizontalalignment='center')3637plt.axis('off')38plt.show()3940if __name__ == '__main__':4142#show_2d_transform()43#show_sigma_selections()4445show_sigma_transform(True)46#show_four_gps()47#show_sigma_transform()48#show_sigma_selections()49505152