import openturns as ot
from matplotlib import pyplot as plt
import openturns.viewer as otv

# Generate points with the given sequence
sequence = ot.HaselgroveSequence(2)
sample = sequence.generate(1000)

# Create the graph
graph = ot.Graph("Sequence of 1000 points", "x1", "x2")
cloud = ot.Cloud(sample)
graph.add(cloud)

# Draw the graph
fig = plt.figure(figsize=(4, 4))
axis = fig.add_subplot(111)
otv.View(graph, figure=fig, axes=[axis], add_legend=False)
axis.set_xlim(auto=True)