本文整理汇总了Python中matplotlib.axes.Axes.relim方法的典型用法代码示例。如果您正苦于以下问题:Python Axes.relim方法的具体用法?Python Axes.relim怎么用?Python Axes.relim使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.axes.Axes
的用法示例。
在下文中一共展示了Axes.relim方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Figure
# 需要导入模块: from matplotlib.axes import Axes [as 别名]
# 或者: from matplotlib.axes.Axes import relim [as 别名]
from matplotlib.backends.backend_agg import FigureCanvasAgg
import dna_walk_utils as walk
import random
size_in_inches = [8, 8] #width, height
fig = Figure(figsize=size_in_inches)
ax = Axes(fig, [.1,.1,.8,.8])
fig.add_axes(ax)
bases = walk.TEST_SEQUENCES["Acinetobacter_calcoaceticus"]
bases2 = walk.TEST_SEQUENCES["A.israelii"]
for samplename in walk.TEST_SEQUENCES.keys():
bases = walk.TEST_SEQUENCES[samplename]
print "Walking", samplename
clr = random.choice("bgrcmyk")
def on_window(from_loc, to_loc):
ax.add_line(Line2D([from_loc.x, to_loc.x],[from_loc.y, to_loc.y], color=clr))
walk.do_line_walk(bases, 4, on_window, )
ax.relim()
ax.axis('tight')
ax.set_title('DNA Walk of "All Seqs.fasta"\n(16S Example Set)')
canvas = FigureCanvasAgg(fig)
canvas.print_figure("dna_walk.png")