class_docstr: Configure tooltips.
  
  Notes
  -----
  Set tooltips='none' to hide tooltips from this layer.
  
  Examples
  --------
  .. jupyter-execute::
      :linenos:
      :emphasize-lines: 15
  
      import numpy as np
      from lets_plot import *
      LetsPlot.setup_html()
      n = 100
      np.random.seed(42)
      data = {
          'id': np.arange(n),
          'x': np.random.normal(size=n),
          'y': np.random.normal(size=n),
          'c': np.random.choice(['a', 'b'], size=n),
          'w': np.random.randint(1, 11, size=n)
      }
      ggplot(data, aes('x', 'y')) + \
          geom_point(aes(color='c', size='w'), \
                     tooltips=layer_tooltips().line('@c "@id"')
                                              .line('---')
                                              .format('@y', '.2f')
                                              .line('(x, y)|(^x, @y)')
                                              .line('@|@w')) + \
          scale_size(range=[2, 4])
  
  |
  
  .. jupyter-execute::
      :linenos:
      :emphasize-lines: 12
  
      import numpy as np
      from lets_plot import *
      LetsPlot.setup_html()
      n = 100
      np.random.seed(42)
      data = {
          'x': np.random.normal(size=n),
          'y': np.random.normal(size=n),
          'c': np.random.randint(10, size=n)
      }
      ggplot(data, aes('x', 'y')) + \
          geom_point(aes(color='c'), tooltips='none')
class_docstr_tok: ["Configure","tooltips",".","Notes","--","--","-","Set","tooltips='none","'","to","hide","tooltips","from","this","layer",".","Examples","--","--","--","--","..","jupyter-execute",":",":",":","linenos",":",":","emphasize-lines",":","15","import","numpy","as","np","from","lets_plot","import","*","LetsPlot.setup_html","(",")","n","=","100","np.random.seed","(","42",")","data","=","{","'id","'",":","np.arange","(","n",")",",","'","x","'",":","np.random.normal","(","size=n",")",",","'","y","'",":","np.random.normal","(","size=n",")",",","'","c","'",":","np.random.choice","(","[","'","a","'",",","'","b","'","]",",","size=n",")",",","'","w","'",":","np.random.randint","(","1",",","11",",","size=n",")","}","ggplot","(","data",",","aes","(","'","x","'",",","'","y","'",")",")","+","\\","geom_point","(","aes","(","color=","'","c","'",",","size=","'","w","'",")",",","\\","tooltips=layer_tooltips","(",")",".line","(","'","@","c","``","@","id","''","'",")",".line","(","'","--","-","'",")",".format","(","'","@","y","'",",","'.2f","'",")",".line","(","'","(","x",",","y",")","|","(","^x",",","@","y",")","'",")",".line","(","'","@","|","@","w","'",")",")","+","\\","scale_size","(","range=","[","2",",","4","]",")","|","..","jupyter-execute",":",":",":","linenos",":",":","emphasize-lines",":","12","import","numpy","as","np","from","lets_plot","import","*","LetsPlot.setup_html","(",")","n","=","100","np.random.seed","(","42",")","data","=","{","'","x","'",":","np.random.normal","(","size=n",")",",","'","y","'",":","np.random.normal","(","size=n",")",",","'","c","'",":","np.random.randint","(","10",",","size=n",")","}","ggplot","(","data",",","aes","(","'","x","'",",","'","y","'",")",")","+","\\","geom_point","(","aes","(","color=","'","c","'",")",",","tooltips='none","'",")"]
docstr: Specify a fixed position for a general tooltip.
  
  Parameters
  ----------
  value : {'top_left', 'top_center', 'top_right', 'middle_left', 'middle_center', 'middle_right', 'bottom_left', 'bottom_center', 'bottom_right'}
      Type of the tooltip anchoring.
  
  Returns
  -------
  `layer_tooltips`
      Layer tooltips specification.
  
  Examples
  --------
  .. jupyter-execute::
      :linenos:
      :emphasize-lines: 10
  
      import numpy as np
      from lets_plot import *
      LetsPlot.setup_html()
      n = 100
      np.random.seed(42)
      x = np.random.normal(size=n)
      y = np.random.normal(size=n)
      ggplot({'x': x, 'y': y}, aes('x', 'y')) + \
          geom_point(tooltips=layer_tooltips().line('(^x, ^y)')\
                                              .anchor('top_center'))
docstr_tok: ["Specify","a","fixed","position","for","a","general","tooltip",".","Parameters","--","--","--","--","--","value",":","{","'top_left","'",",","'top_center","'",",","'top_right","'",",","'middle_left","'",",","'middle_center","'",",","'middle_right","'",",","'bottom_left","'",",","'bottom_center","'",",","'bottom_right","'","}","Type","of","the","tooltip","anchoring",".","Returns","--","--","--","-","`","layer_tooltips","`","Layer","tooltips","specification",".","Examples","--","--","--","--","..","jupyter-execute",":",":",":","linenos",":",":","emphasize-lines",":","10","import","numpy","as","np","from","lets_plot","import","*","LetsPlot.setup_html","(",")","n","=","100","np.random.seed","(","42",")","x","=","np.random.normal","(","size=n",")","y","=","np.random.normal","(","size=n",")","ggplot","(","{","'","x","'",":","x",",","'","y","'",":","y","}",",","aes","(","'","x","'",",","'","y","'",")",")","+","\\","geom_point","(","tooltips=layer_tooltips","(",")",".line","(","'","(","^x",",","^y",")","'",")","\\",".anchor","(","'top_center","'",")",")"]
code: def anchor(self, value):
      """
          Specify a fixed position for a general tooltip.
  
          Parameters
          ----------
          value : {'top_left', 'top_center', 'top_right', 'middle_left', 'middle_center', 'middle_right', 'bottom_left', 'bottom_center', 'bottom_right'}
              Type of the tooltip anchoring.
  
          Returns
          -------
          `layer_tooltips`
              Layer tooltips specification.
  
          Examples
          --------
          .. jupyter-execute::
              :linenos:
              :emphasize-lines: 10
  
              import numpy as np
              from lets_plot import *
              LetsPlot.setup_html()
              n = 100
              np.random.seed(42)
              x = np.random.normal(size=n)
              y = np.random.normal(size=n)
              ggplot({'x': x, 'y': y}, aes('x', 'y')) + \\
                  geom_point(tooltips=layer_tooltips().line('(^x, ^y)')\\
                                                      .anchor('top_center'))
  
          """
      self._tooltip_anchor = value
      return self
  
file_path: lets-plot/python-package/lets_plot/plot/tooltip.py
imports: from typing import List
  from lets_plot.plot.core import FeatureSpec, _filter_none
label_desc: Use image node_id 5 for calling the layer_tooltips obj's underlying member method code with example usage: obj.anchor(value) and returns: self