MCPcopy Index your code
hub / github.com/bqplot/bqplot / Hist

Class Hist

bqplot/marks.py:841–928  ·  view source on GitHub ↗

Histogram mark. !!! warning In the case of the Hist mark, scales for 'sample' and 'count' **must** be provided. Data Attributes --------------- Attributes ---------- sample: numpy.ndarray (default: []) sample of which the histogram must be computed. cou

Source from the content-addressed store, hash-verified

839
840@register_mark('bqplot.Hist')
841class Hist(Mark):
842
843 """Histogram mark.
844
845 !!! warning
846 In the case of the Hist mark, scales for 'sample' and 'count' **must** be provided.
847
848 Data Attributes
849 ---------------
850
851 Attributes
852 ----------
853 sample: numpy.ndarray (default: [])
854 sample of which the histogram must be computed.
855 count: numpy.ndarray (read-only)
856 number of sample points per bin. It is a read-only attribute.
857
858 Style Attributes
859 ----------------
860
861 Attributes
862 ----------
863 icon: string (class-level attribute)
864 font-awesome icon for that mark
865 name: string (class-level attribute)
866 user-friendly name of the mark
867 bins: nonnegative int (default: 10)
868 number of bins in the histogram
869 normalized: bool (default: False)
870 Boolean attribute to return normalized values which
871 sum to 1 or direct counts for the `count` attribute. The scale of
872 `count` attribute is determined by the value of this flag.
873 colors: list of colors (default: ['steelblue'])
874 List of colors of the Histogram. If the list is shorter than the number
875 of bins, the colors are reused.
876 stroke: Color or None (default: None)
877 Stroke color of the histogram
878 opacities: list of floats (default: [])
879 Opacity for the bins of the histogram. Defaults to 1 when the list
880 is too short, or the element of the list is set to None.
881 midpoints: list (default: [])
882 midpoints of the bins of the histogram. It is a read-only attribute.
883
884 !!! Note
885 - The fields which can be passed to the default tooltip are:
886 - **midpoint**: mid-point of the bin related to the rectangle hovered on
887 - **count**: number of elements in the bin hovered on
888 - **bin_start**: start point of the bin
889 - **bin_end**: end point of the bin
890 - **index**: index of the bin
891 """
892 # Mark decoration
893 icon = 'fa-signal'
894 name = 'Histogram'
895
896 # Scaled attributes
897 sample = Array([]).tag(sync=True, display_name='Sample',
898 scaled=True, rtype='Number',

Callers

nothing calls this directly

Calls 1

array_dimension_boundsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…