當前位置: 首頁>>代碼示例>>Python>>正文


Python Line2D.__init__方法代碼示例

本文整理匯總了Python中matplotlib.lines.Line2D.__init__方法的典型用法代碼示例。如果您正苦於以下問題:Python Line2D.__init__方法的具體用法?Python Line2D.__init__怎麽用?Python Line2D.__init__使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在matplotlib.lines.Line2D的用法示例。


在下文中一共展示了Line2D.__init__方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
 def __init__(self, ticksize=5., tick_out=False, **kwargs):
     self.set_ticksize(ticksize)
     self.set_tick_out(tick_out)
     self.clear()
     Line2D.__init__(self, [0.], [0.], **kwargs)
     self.set_color('black')
     self.set_visible_axes('all')
開發者ID:ChrisBeaumont,項目名稱:wcsaxes,代碼行數:9,代碼來源:ticks.py

示例2: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
 def __init__(self, ticksize=None, tick_out=False, **kwargs):
     if ticksize is None:
         ticksize = rcParams["xtick.major.size"]
     self.set_ticksize(ticksize)
     self.set_tick_out(tick_out)
     # FIXME: tick_out is incompatible with Matplotlib tickdir option
     self.clear()
     line2d_kwargs = {"color": rcParams["xtick.color"], "linewidth": rcParams["xtick.major.width"]}
     line2d_kwargs.update(kwargs)
     Line2D.__init__(self, [0.0], [0.0], **line2d_kwargs)
     self.set_visible_axes("all")
     self._display_minor_ticks = False
開發者ID:mherkazandjian,項目名稱:glue,代碼行數:14,代碼來源:ticks.py

示例3: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
 def __init__(self, ticksize=None, tick_out=None, **kwargs):
     if ticksize is None:
         ticksize = rcParams['xtick.major.size']
     self.set_ticksize(ticksize)
     self.set_minor_ticksize(rcParams['xtick.minor.size'])
     self.set_tick_out(rcParams['xtick.direction'] == 'out')
     self.clear()
     line2d_kwargs = {'color': rcParams['xtick.color'],
                      'linewidth': rcParams['xtick.major.width']}
     line2d_kwargs.update(kwargs)
     Line2D.__init__(self, [0.], [0.], **line2d_kwargs)
     self.set_visible_axes('all')
     self._display_minor_ticks = False
開發者ID:Cadair,項目名稱:astropy,代碼行數:15,代碼來源:ticks.py

示例4: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
    def __init__(self, *args, **kwargs):
        """Initialize the line and arrow.

        See the top-level class documentation.
        """
        self._arrow = kwargs.pop('arrow', '-')
        self._arrowsize = kwargs.pop('arrowsize', 2 * 4)
        self._arrowedgecolor = kwargs.pop('arrowedgecolor', 'b')
        self._arrowfacecolor = kwargs.pop('arrowfacecolor', 'b')
        self._arrowedgewidth = kwargs.pop('arrowedgewidth', 4)
        self._arrowheadwidth = kwargs.pop('arrowheadwidth', self._arrowsize)
        self._arrowheadlength = kwargs.pop('arrowheadlength', self._arrowsize)
        Line2D.__init__(self, *args, **kwargs)
開發者ID:acquatella,項目名稱:ModelicaRes,代碼行數:15,代碼來源:util.py

示例5: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
 def __init__(self, ticksize=None, tick_out=None, **kwargs):
     if ticksize is None:
         ticksize = rcParams['xtick.major.size']
     self.set_ticksize(ticksize)
     self.set_tick_out(rcParams.get('xtick.direction', 'in') == 'out')
     self.clear()
     line2d_kwargs = {'color': rcParams['xtick.color'],
                      # For the linewidth we need to set a default since old versions of
                      # matplotlib don't have this.
                      'linewidth': rcParams.get('xtick.major.width', 1)}
     line2d_kwargs.update(kwargs)
     Line2D.__init__(self, [0.], [0.], **line2d_kwargs)
     self.set_visible_axes('all')
     self._display_minor_ticks = False
開發者ID:Juanlu001,項目名稱:astropy,代碼行數:16,代碼來源:ticks.py

示例6: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
 def __init__(self, ticksize=None, tick_out=False, **kwargs):
     if ticksize is None:
         ticksize = rcParams['xtick.major.size']
     self.set_ticksize(ticksize)
     self.set_tick_out(tick_out)
     # FIXME: tick_out is incompatible with Matplotlib tickdir option
     self.clear()
     line2d_kwargs = {
         'color': rcParams['xtick.color'],
         'linewidth': rcParams['xtick.major.width']
     }
     line2d_kwargs.update(kwargs)
     Line2D.__init__(self, [0.], [0.], **line2d_kwargs)
     self.set_visible_axes('all')
開發者ID:cdeil,項目名稱:wcsaxes,代碼行數:16,代碼來源:ticks.py

示例7: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
 def __init__(self, ticksize=None, tick_out=None, **kwargs):
     if ticksize is None:
         ticksize = rcParams["xtick.major.size"]
     self.set_ticksize(ticksize)
     self.set_tick_out(rcParams.get("xtick.direction", "in") == "out")
     self.clear()
     line2d_kwargs = {
         "color": rcParams["xtick.color"],
         # For the linewidth we need to set a default since old versions of
         # matplotlib don't have this.
         "linewidth": rcParams.get("xtick.major.width", 1),
     }
     line2d_kwargs.update(kwargs)
     Line2D.__init__(self, [0.0], [0.0], **line2d_kwargs)
     self.set_visible_axes("all")
     self._display_minor_ticks = False
開發者ID:saimn,項目名稱:glue,代碼行數:18,代碼來源:ticks.py

示例8: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
 def __init__(self, xfield = None, yfield = None, canvas = None, *args, **kwargs):
     self.canvas = canvas
     self.original_xfield = xfield
     self.original_yfield = yfield
     self.current_xfield = xfield
     self.current_yfield = yfield
     self.press = None
     self.draggable = False
     self.color = "b"
     self.marker = "None"
     self.xscale = 1.0
     self.yscale = 1.0
     self.xoffset = 0
     self.yoffset = 0
     Line2D.__init__(self, 
                     self.current_xfield.to_list(), 
                     self.current_yfield.to_list(),
                     *args,**kwargs)
開發者ID:nathanial,項目名稱:curveeditor,代碼行數:20,代碼來源:plots.py

示例9: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
 def __init__(self, path, *args, **kwargs):
     Line2D.__init__(self, [], [], *args, **kwargs)
     self._path = path
     self._invalid = False
開發者ID:HubertHolin,項目名稱:matplotlib,代碼行數:6,代碼來源:axis_artist.py

示例10: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
	def __init__(self, *args, **kwargs):
		Line2D.__init__(self, *args, **kwargs)
開發者ID:luipir,項目名稱:ps-speed,代碼行數:4,代碼來源:plot_wdg.py

示例11: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
 def __init__(self, **attrs):
     styles = {'color': '0.5', 'linestyle': '-', 'linewidth': 1}
     styles.update(attrs)
     Line2D.__init__(self, [], [], **styles)
開發者ID:roytest001,項目名稱:PythonCode,代碼行數:6,代碼來源:risto.py

示例12: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
 def __init__(self, ax, *args, **kwargs):
     Line2D.__init__(self, *args, **kwargs)
     self.ax = ax
開發者ID:emayssat,項目名稱:sandbox,代碼行數:5,代碼來源:clippedline.py

示例13: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
 def __init__(self, path, *kl, **kw):
     Line2D.__init__(self, [], [], *kl, **kw)
     self._path = path
     self._invalid = False
開發者ID:dopplershift,項目名稱:matplotlib,代碼行數:6,代碼來源:axis_artist.py

示例14: __init__

# 需要導入模塊: from matplotlib.lines import Line2D [as 別名]
# 或者: from matplotlib.lines.Line2D import __init__ [as 別名]
        
=======
    def __init__(self, ticksize=None, tick_out=False, **kwargs):
        if ticksize is None:
            ticksize = rcParams['xtick.major.size']
>>>>>>> upstream/master
        self.set_ticksize(ticksize)
        self.set_tick_out(tick_out)
        # FIXME: tick_out is incompatible with Matplotlib tickdir option
        self.clear()
        line2d_kwargs = {
            'color': rcParams['xtick.color'],
            'linewidth': rcParams['xtick.major.width']
        }
        line2d_kwargs.update(kwargs)
        Line2D.__init__(self, [0.], [0.], **line2d_kwargs)
        self.set_visible_axes('all')

    def set_tick_out(self, tick_out):
        
        """
        set True if tick need to be rotated by 180 degree.
        """
        self._tick_out = tick_out

    def get_tick_out(self):
        
        """
        Return True if the tick will be rotated by 180 degree.
        """
        return self._tick_out
開發者ID:Sathaye,項目名稱:wcsaxes,代碼行數:33,代碼來源:ticks.py


注:本文中的matplotlib.lines.Line2D.__init__方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。