本文整理汇总了Python中matplotlib.axes.Axes.semilogx方法的典型用法代码示例。如果您正苦于以下问题:Python Axes.semilogx方法的具体用法?Python Axes.semilogx怎么用?Python Axes.semilogx使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.axes.Axes
的用法示例。
在下文中一共展示了Axes.semilogx方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: draw
# 需要导入模块: from matplotlib.axes import Axes [as 别名]
# 或者: from matplotlib.axes.Axes import semilogx [as 别名]
#.........这里部分代码省略.........
float( height - plot_bottom_padding - plot_top_padding - x_label_space - \
plot_title_size - 2 * plot_title_padding - stats_line_space ) / f_height )
ax = Axes( self.figure, ax_plot_rect )
if prefs['square_axis']:
l, b, a_width, a_height = ax.get_window_extent().bounds
delta = abs( a_height - a_width )
if a_height > a_width:
a_height = a_width
ax_plot_rect = ( float( plot_left_padding + left ) / f_width,
float( plot_bottom_padding + bottom + delta / 2. ) / f_height,
float( width - plot_left_padding - plot_right_padding ) / f_width,
float( height - plot_bottom_padding - plot_title_size - 2 * plot_title_padding - delta ) / f_height )
else:
a_width = a_height
ax_plot_rect = ( float( plot_left_padding + left + delta / 2. ) / f_width,
float( plot_bottom_padding + bottom ) / f_height,
float( width - plot_left_padding - delta ) / f_width,
float( height - plot_bottom_padding - plot_title_size - 2 * plot_title_padding ) / f_height )
ax.set_position( ax_plot_rect )
self.figure.add_axes( ax )
self.ax = ax
frame = ax.patch
frame.set_fill( False )
if frame_flag.lower() == 'off':
self.ax.set_axis_off()
self.log_xaxis = False
self.log_yaxis = False
else:
# If requested, make x/y axis logarithmic
if prefs.get( 'log_xaxis', 'False' ).find( 'r' ) >= 0:
ax.semilogx()
self.log_xaxis = True
else:
self.log_xaxis = False
if prefs.get( 'log_yaxis', 'False' ).find( 'r' ) >= 0:
ax.semilogy()
self.log_yaxis = True
else:
self.log_yaxis = False
if xticks_flag:
setp( ax.get_xticklabels(), family = prefs['font_family'] )
setp( ax.get_xticklabels(), fontname = prefs['font'] )
setp( ax.get_xticklabels(), size = tick_text_size_point )
else:
setp( ax.get_xticklabels(), size = 0 )
if yticks_flag:
setp( ax.get_yticklabels(), family = prefs['font_family'] )
setp( ax.get_yticklabels(), fontname = prefs['font'] )
setp( ax.get_yticklabels(), size = tick_text_size_point )
else:
setp( ax.get_yticklabels(), size = 0 )
setp( ax.get_xticklines(), markeredgewidth = pixelToPoint( 0.5, dpi ) )
setp( ax.get_xticklines(), markersize = pixelToPoint( text_size / 2., dpi ) )
setp( ax.get_yticklines(), markeredgewidth = pixelToPoint( 0.5, dpi ) )
setp( ax.get_yticklines(), markersize = pixelToPoint( text_size / 2., dpi ) )
setp( ax.get_xticklines(), zorder = 4.0 )
line_width = prefs.get( 'line_width', 1.0 )
frame_line_width = prefs.get( 'frame_line_width', line_width )
grid_line_width = prefs.get( 'grid_line_width', 0.1 )