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

Class Bars

bqplot/marks.py:1004–1154  ·  view source on GitHub ↗

Bar mark. !!! warning In the case of the Bars mark, scales for 'x' and 'y' **must** be provided. The scales of other data attributes are optional. In the case where another data attribute than 'x' or 'y' is provided but the corresponding scale is missing, the da

Source from the content-addressed store, hash-verified

1002
1003@register_mark('bqplot.Bars')
1004class Bars(Mark):
1005
1006 """Bar mark.
1007
1008 !!! warning
1009 In the case of the Bars mark, scales for 'x' and 'y' **must** be provided.
1010 The scales of other data attributes are optional. In the case where another
1011 data attribute than 'x' or 'y' is provided but the corresponding scale is
1012 missing, the data attribute is ignored.
1013
1014 Data Attributes
1015 ---------------
1016
1017 Attributes
1018 ----------
1019 x: numpy.ndarray (default: [])
1020 abscissas of the data points (1d array)
1021 y: numpy.ndarray (default: [])
1022 ordinates of the values for the data points
1023 color: numpy.ndarray or None (default: None)
1024 color of the data points (1d array). Defaults to default_color when not
1025 provided or when a value is NaN
1026
1027 Style Attributes
1028 ----------------
1029
1030 Attributes
1031 ----------
1032 icon: string (class-level attribute)
1033 font-awesome icon for that mark
1034 name: string (class-level attribute)
1035 user-friendly name of the mark
1036 color_mode: {'auto', 'group', 'element', 'no_group'}
1037 Specify how default colors are applied to bars.
1038 The 'group' mode means colors are assigned per group. If the list
1039 of colors is shorter than the number of groups, colors are reused.
1040 The 'element' mode means colors are assigned per group element. If the list
1041 of colors is shorter than the number of bars in a group, colors are reused.
1042 The 'no_group' mode means colors are assigned per bar, discarding the fact
1043 that there are groups or stacks. If the list of colors is shorter than the
1044 total number of bars, colors are reused.
1045 opacity_mode: {'auto', 'group', 'element', 'no_group'}
1046 Same as the `color_mode` attribute, but for the opacity.
1047 type: {'stacked', 'grouped'}
1048 whether 2-dimensional bar charts should appear grouped or stacked.
1049 colors: list of colors (default: ['steelblue'])
1050 list of colors for the bars.
1051 orientation: {'horizontal', 'vertical'}
1052 Specifies whether the bar chart is drawn horizontally or vertically.
1053 If a horizontal bar chart is drawn, the x data is drawn vertically.
1054 padding: float (default: 0.05)
1055 Attribute to control the spacing between the bars value is specified
1056 as a percentage of the width of the bar
1057 fill: Bool (default: True)
1058 Whether to fill the bars or not
1059 stroke: Color or None (default: None)
1060 Stroke color for the bars
1061 stroke_width: Float (default: 0.)

Callers

nothing calls this directly

Calls 2

array_dimension_boundsFunction · 0.85
array_supported_kindsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…