#-----------------------------------------------------------------------------# Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors.# All rights reserved.## The full license is in the file LICENSE.txt, distributed with this software.#-----------------------------------------------------------------------------''' Display a variety of simple scatter marker shapes whose attributescan be associated with data columns from:class:`~bokeh.models.sources.ColumnDataSource` objects... warning:: The individual marker classes in this module are **deprecated since Bokeh 2.3.0.** Please replace all occurrences of ``Marker`` models with :class:`~bokeh.models.glyphs.Scatter` glyphs. For example: instead of ``Asterisk()``, use ``Scatter(marker="asterisk")``. For backwards compatibility, all markers in this module currently link to their respective replacements using the :class:`~bokeh.models.glyphs.Scatter` glyph.By definition, all markers accept the following set of properties:* ``x``, ``y`` position* ``size`` in pixels* ``line``, ``fill``, and ``hatch`` properties* ``angle``The ``asterisk``, ``cross``, ``dash``, ``dot``, ``x``, and ``y`` only renderline components. Those markers ignore any values that are passed to the ``fill``and ``hatch`` properties... note:: When you draw ``circle`` markers with ``Scatter``, you can only assign a size in |screen units| (by passing a number of pixels to the ``size`` property). In case you want to define the radius of circles in |data units|, use the :class:`~bokeh.models.glyphs.Circle` glyph instead of the ``Scatter`` glyph.'''#-----------------------------------------------------------------------------# Boilerplate#-----------------------------------------------------------------------------from__future__importannotationsimportlogging# isort:skiplog=logging.getLogger(__name__)#-----------------------------------------------------------------------------# Imports#-----------------------------------------------------------------------------# Bokeh importsfrom..util.deprecationimportdeprecatedfrom.importglyphsfrom.glyphsimportCircle,Marker,Scatter#-----------------------------------------------------------------------------# Globals and constants#-----------------------------------------------------------------------------__all__=('Asterisk','Circle','CircleCross','CircleDot','CircleX','CircleY','Cross','Dash','Diamond','DiamondCross','DiamondDot','Dot','Hex','HexDot','InvertedTriangle','Marker','Plus','Scatter','Square','SquareCross','SquareDot','SquarePin','SquareX','Star','StarDot','Triangle','TriangleDot','TrianglePin','X','Y',)#-----------------------------------------------------------------------------# General API#-----------------------------------------------------------------------------
[docs]defCircleCross(*args,**kwargs):''' Render circle markers with a '+' cross through the center. (deprecated) '''deprecated((2,3,0),"CircleCross()","Scatter(marker='circle_cross')")returnScatter(*args,**kwargs,marker="circle_cross")
[docs]defCircleDot(*args,**kwargs):''' Render circle markers with center dots. (deprecated) '''deprecated((2,3,0),"CircleDot()","Scatter(marker='circle_dot')")returnScatter(*args,**kwargs,marker="circle_dot")
[docs]defCircleX(*args,**kwargs):''' Render circle markers with an 'X' cross through the center. (deprecated) '''deprecated((2,3,0),"CircleX()","Scatter(marker='circle_x')")returnScatter(*args,**kwargs,marker="circle_x")
[docs]defCircleY(*args,**kwargs):''' Render circle markers with an 'Y' cross through the center. (deprecated) '''deprecated((2,3,0),"CircleY()","Scatter(marker='circle_y')")returnScatter(*args,**kwargs,marker="circle_y")
[docs]defDiamondCross(*args,**kwargs):''' Render diamond markers with a '+' cross through the center. (deprecated) '''deprecated((2,3,0),"DiamondCross()","Scatter(marker='diamond_cross')")returnScatter(*args,**kwargs,marker="diamond_cross")
[docs]defDiamondDot(*args,**kwargs):''' Render diamond markers with center dots. (deprecated) '''deprecated((2,3,0),"DiamondDot()","Scatter(marker='diamond_dot')")returnScatter(*args,**kwargs,marker="diamond_dot")
[docs]defHexDot(*args,**kwargs):''' Render hexagon markers with center dots. (deprecated) '''deprecated((2,3,0),"HexDot()","Scatter(marker='hex_dot')")returnScatter(*args,**kwargs,marker="hex_dot")
[docs]defSquareDot(*args,**kwargs):''' Render square markers with center dots. (deprecated) '''deprecated((2,3,0),"SquareDot()","Scatter(marker='square_dot')")returnScatter(*args,**kwargs,marker="square_dot")
[docs]defSquareCross(*args,**kwargs):''' Render square markers with a '+' cross through the center. (deprecated) '''deprecated((2,3,0),"SquareCross()","Scatter(marker='square_cross')")returnScatter(*args,**kwargs,marker="square_cross")
[docs]defSquareX(*args,**kwargs):''' Render square markers with an 'X' cross through the center. (deprecated) '''deprecated((2,3,0),"SquareX()","Scatter(marker='square_x')")returnScatter(*args,**kwargs,marker="square_x")
[docs]defStar(*args,**kwargs):''' Render star markers. (deprecated) '''deprecated((2,3,0),"Star()","Scatter(marker='star')")returnScatter(*args,**kwargs,marker="star")
[docs]defStarDot(*args,**kwargs):''' Render star markers with center dots. (deprecated) '''deprecated((2,3,0),"StarDot()","Scatter(marker='star_dot')")returnScatter(*args,**kwargs,marker="star_dot")
[docs]defTriangleDot(*args,**kwargs):''' Render triangle markers with center dots. (deprecated) '''deprecated((2,3,0),"TriangleDot()","Scatter(marker='triangle_dot')")returnScatter(*args,**kwargs,marker="triangle_dot")