1{{ objname }} 2{{ underline }}{{ underline }} 3 4.. plot:: 5 :include-source: False 6 7 import openturns as ot 8 from matplotlib import pyplot as plt 9 from openturns.viewer import View 10 if ot.{{ objname }}().__class__.__name__ == 'Process': 11 # default to Gaussian for the interface class 12 process = ot.GaussianProcess() 13 elif ot.{{ objname }}().__class__.__name__ == 'DiscreteMarkovChain': 14 process = ot.{{ objname }}() 15 process.setTransitionMatrix(ot.SquareMatrix([[0.0,0.5,0.5],[0.7,0.0,0.3],[0.8,0.0,0.2]])) 16 origin = 0 17 process.setOrigin(origin) 18 else: 19 process = ot.{{ objname }}() 20 process.setTimeGrid(ot.RegularGrid(0.0, 0.02, 50)) 21 process.setDescription(['$x$']) 22 sample = process.getSample(6) 23 sample_graph = sample.drawMarginal(0) 24 sample_graph.setTitle(str(process)) 25 26 fig = plt.figure(figsize=(10, 4)) 27 sample_axis = fig.add_subplot(111) 28 View(sample_graph, figure=fig, axes=[sample_axis], add_legend=False) 29 30.. currentmodule:: {{ module }} 31 32.. autoclass:: {{ objname }} 33 34 {% block methods %} 35 .. automethod:: __init__ 36 {% endblock %} 37