Draws a bar chart in the current context figure. Parameters ---------- x: numpy.ndarray, 1d The x-coordinates of the data points. y: numpy.ndarray, 1d The y-coordinates of the data pints. options: dict (default: {}) Options for the scales to be created.
(x, y, **kwargs)
| 859 | |
| 860 | @_process_data('color') |
| 861 | def bar(x, y, **kwargs): |
| 862 | """Draws a bar chart in the current context figure. |
| 863 | |
| 864 | Parameters |
| 865 | ---------- |
| 866 | |
| 867 | x: numpy.ndarray, 1d |
| 868 | The x-coordinates of the data points. |
| 869 | y: numpy.ndarray, 1d |
| 870 | The y-coordinates of the data pints. |
| 871 | options: dict (default: {}) |
| 872 | Options for the scales to be created. If a scale labeled 'x' is |
| 873 | required for that mark, options['x'] contains optional keyword |
| 874 | arguments for the constructor of the corresponding scale type. |
| 875 | axes_options: dict (default: {}) |
| 876 | Options for the axes to be created. If an axis labeled 'x' is required |
| 877 | for that mark, axes_options['x'] contains optional keyword arguments |
| 878 | for the constructor of the corresponding axis type. |
| 879 | """ |
| 880 | kwargs['x'] = x |
| 881 | kwargs['y'] = y |
| 882 | return _draw_mark(Bars, **kwargs) |
| 883 | |
| 884 | |
| 885 | @_process_data() |