class_docstr: This class is intended to build correlation matrix plot.
  
  Examples
  --------
  .. jupyter-execute::
      :linenos:
      :emphasize-lines: 7
  
      import numpy as np
      from lets_plot import *
      from lets_plot.bistro.corr import *
      LetsPlot.setup_html()
      np.random.seed(42)
      data = {var: np.random.poisson(size=10) for var in 'abcdef'}
      corr_plot(data).tiles().build()
  
  |
  
  .. jupyter-execute::
      :linenos:
      :emphasize-lines: 7-9
  
      import numpy as np
      from lets_plot import *
      from lets_plot.bistro.corr import *
      LetsPlot.setup_html()
      np.random.seed(42)
      data = {var: np.random.uniform(size=10) for var in 'abcd'}
      corr_plot(data).tiles(type='upper', diag=True)\
          .labels(type='upper', diag=True, map_size=True, color='black')\
          .palette_RdBu().build()
  
  |
  
  .. jupyter-execute::
      :linenos:
      :emphasize-lines: 7-9
  
      import numpy as np
      from lets_plot import *
      from lets_plot.bistro.corr import *
      LetsPlot.setup_html()
      np.random.seed(42)
      data = {var: np.random.normal(size=10) for var in 'abcdef'}
      corr_plot(data, flip=False, threshold=.4).points().labels()\
          .palette_gradient(low='#d73027', mid='#ffffbf', high='#1a9850')\
          .build()
class_docstr_tok: ["This","class","is","intended","to","build","correlation","matrix","plot",".","Examples","--","--","--","--","..","jupyter-execute",":",":",":","linenos",":",":","emphasize-lines",":","7","import","numpy","as","np","from","lets_plot","import","*","from","lets_plot.bistro.corr","import","*","LetsPlot.setup_html","(",")","np.random.seed","(","42",")","data","=","{","var",":","np.random.poisson","(","size=10",")","for","var","in","'abcdef","'","}","corr_plot","(","data",")",".tiles","(",")",".build","(",")","|","..","jupyter-execute",":",":",":","linenos",":",":","emphasize-lines",":","7-9","import","numpy","as","np","from","lets_plot","import","*","from","lets_plot.bistro.corr","import","*","LetsPlot.setup_html","(",")","np.random.seed","(","42",")","data","=","{","var",":","np.random.uniform","(","size=10",")","for","var","in","'abcd","'","}","corr_plot","(","data",")",".tiles","(","type='upper","'",",","diag=True",")","\\",".labels","(","type='upper","'",",","diag=True",",","map_size=True",",","color='black","'",")","\\",".palette_RdBu","(",")",".build","(",")","|","..","jupyter-execute",":",":",":","linenos",":",":","emphasize-lines",":","7-9","import","numpy","as","np","from","lets_plot","import","*","from","lets_plot.bistro.corr","import","*","LetsPlot.setup_html","(",")","np.random.seed","(","42",")","data","=","{","var",":","np.random.normal","(","size=10",")","for","var","in","'abcdef","'","}","corr_plot","(","data",",","flip=False",",","threshold=.4",")",".points","(",")",".labels","(",")","\\",".palette_gradient","(","low=","'","#","d73027","'",",","mid=","'","#","ffffbf","'",",","high=","'","#","1a9850","'",")","\\",".build","(",")"]
docstr: Parameters
  ----------
  data : dict or Pandas or Polars `DataFrame`
      Correlation matrix or data (correlation will be calculated for each variable pair).
      Data will be recognized as correlation matrix if it has a square shape and all values are
      in range -1.0..+1.0 or NaN.
  show_legend : bool, default=True
      If True legend is shown.
  flip : bool, default=True
      If True the y axis is flipped.
  threshold : float, default=0.0
      Minimal correlation abs value to be included in result.
      Accept values between 0 and 1.
docstr_tok: ["Parameters","--","--","--","--","--","data",":","dict","or","Pandas","or","Polars","`","DataFrame","`","Correlation","matrix","or","data","(","correlation","will","be","calculated","for","each","variable","pair",")",".","Data","will","be","recognized","as","correlation","matrix","if","it","has","a","square","shape","and","all","values","are","in","range","-1.0","..","+1.0","or","NaN",".","show_legend",":","bool",",","default=True","If","True","legend","is","shown",".","flip",":","bool",",","default=True","If","True","the","y","axis","is","flipped",".","threshold",":","float",",","default=0.0","Minimal","correlation","abs","value","to","be","included","in","result",".","Accept","values","between","0","and","1","."]
code: def __init__(self, data, show_legend=True, flip=True, threshold=None):
      """
      Parameters
      ----------
      data : dict or Pandas or Polars `DataFrame`
          Correlation matrix or data (correlation will be calculated for each variable pair).
          Data will be recognized as correlation matrix if it has a square shape and all values are
          in range -1.0..+1.0 or NaN.
      show_legend : bool, default=True
          If True legend is shown.
      flip : bool, default=True
          If True the y axis is flipped.
      threshold : float, default=0.0
          Minimal correlation abs value to be included in result.
          Accept values between 0 and 1.
  
      """
  
      self._data = data
      self._show_legend = show_legend
      self._reverse_y = flip if flip else False
      self.threshold = threshold
      self._color_scale = None
      self._fill_scale = None
      self._points_params = None
      self._tiles_params = None
      self._labels_params = None
      self._labels_map_size = None
      self._palette = None
      self._low = None
      self._mid = None
      self._high = None
  
imports: from typing import Any
  from lets_plot.plot.util import is_data_frame
  from lets_plot.plot.core import PlotSpec
label_desc: Use image node_id 2 to create a new corr_plot object  with example: obj = corr_plot(data, show_legend, flip, threshold)