Draw a map in the current context figure. Parameters ---------- map_data: string or bqplot.map (default: WorldMap) Name of the map or json file required for the map data. options: dict (default: {}) Options for the scales to be created. If a scale labeled 'x' is
(map_data, **kwargs)
| 975 | |
| 976 | |
| 977 | def geo(map_data, **kwargs): |
| 978 | """Draw a map in the current context figure. |
| 979 | |
| 980 | Parameters |
| 981 | ---------- |
| 982 | map_data: string or bqplot.map (default: WorldMap) |
| 983 | Name of the map or json file required for the map data. |
| 984 | options: dict (default: {}) |
| 985 | Options for the scales to be created. If a scale labeled 'x' is |
| 986 | required for that mark, options['x'] contains optional keyword |
| 987 | arguments for the constructor of the corresponding scale type. |
| 988 | axes_options: dict (default: {}) |
| 989 | Options for the axes to be created. If an axis labeled 'x' is required |
| 990 | for that mark, axes_options['x'] contains optional keyword arguments |
| 991 | for the constructor of the corresponding axis type. |
| 992 | """ |
| 993 | scales = kwargs.pop('scales', _context['scales']) |
| 994 | options = kwargs.get('options', {}) |
| 995 | if 'projection' not in scales: |
| 996 | scales['projection'] = Mercator(**options.get('projection', {})) |
| 997 | kwargs['scales'] = scales |
| 998 | if isinstance(map_data, string_types): |
| 999 | kwargs['map_data'] = topo_load('map_data/' + map_data + '.json') |
| 1000 | else: |
| 1001 | kwargs['map_data'] = map_data |
| 1002 | return _draw_mark(Map, **kwargs) |
| 1003 | |
| 1004 | |
| 1005 | def heatmap(color, **kwargs): |
nothing calls this directly
no test coverage detected