PLOTS basicPpΒΆ

# -*-Python-*-
# Created by bgrierson at 13 Dec 2016  07:39

# This file style is an OMFITpythonPlot
# By default, this file creates a figure when executed if there are no open
# figures, or else it plots on the existing figure.
# This behaviour can be seen by running the following in the Command box:
#
# # Create a new figure when plotting
# OMFIT['TUTORIAL']['PLOTS']['basicPp'].plotFigure()
# # Create another new figure when plotting
# OMFIT['TUTORIAL']['PLOTS']['basicPp'].plotFigure()
#
# # Create a new figure when plotting and then overplot
# OMFIT['TUTORIAL']['PLOTS']['basicPp'].plotFigure()
# # Plot on existing figure
# OMFIT['TUTORIAL']['PLOTS']['basicPp'].plot()

# Make x and y variables
x = linspace(0, 1, 101) * 2.0 * np.pi
y = np.sin(x)

# Get current figure handle created by this file
fig = gcf()
ax = fig.gca()
ax.plot(x, y)