コード例 #1
0
           Point(4.9, 2.8, "inches"),
           spacing=Vector(.5, .5, "inches"))
for i in [7, 8, 5]:
    axname = "point" + str(i)
    ax = c.ax(axname)
    ax.plot(np.random.random(10))
    ax.set_yticks([])
    ax.spines['right'].set_visible(True)
    ax.spines['top'].set_visible(True)
    # Draw lines from the top and bottom of the plot to the point.
    # The unit "axis_point1" represents the relative position with
    # respect to the axis location, where (0,0) is the bottom left and
    # (1,1) is the upper right.
    c.add_line(Point(data[0, i], data[1, i], "scatter"),
               Point(0, 0, "axis_" + axname),
               linewidth=.5,
               alpha=.5,
               color='k',
               linestyle='--')
    c.add_line(Point(data[0, i], data[1, i], "scatter"),
               Point(0, 1, "axis_" + axname),
               linewidth=.5,
               alpha=.5,
               color='k',
               linestyle='--')

# Suppose we also want to include a small image of a sun in the upper
# right corner.  If the image is saved in .png or .pdf format, it can
# be easily added to the figure.
#
# There are a few different options for specifying the position of the
# image.  As with an axis, we could specify both the position of the