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

Function create_figure_scatter

js/src/test/widget-utils.ts:61–163  ·  view source on GitHub ↗
(
  manager,
  x,
  y,
  log = false,
  autoLayout = false
)

Source from the content-addressed store, hash-verified

59}
60
61export async function create_figure_scatter(
62 manager,
63 x,
64 y,
65 log = false,
66 autoLayout = false
67) {
68 const layout = await create_model(
69 manager,
70 '@jupyter-widgets/base',
71 'LayoutModel',
72 'LayoutView',
73 'layout_figure1',
74 { _dom_classes: '', width: '400px', height: '500px' }
75 );
76 let scale_x;
77 let scale_y;
78 if (log) {
79 scale_x = await create_model_bqscales(manager, 'LogScale', 'scale_x', {
80 min: 0.01,
81 max: 100,
82 allow_padding: false,
83 });
84 scale_y = await create_model_bqscales(manager, 'LogScale', 'scale_y', {
85 min: 0.1,
86 max: 10,
87 allow_padding: false,
88 });
89 } else {
90 scale_x = await create_model_bqscales(manager, 'LinearScale', 'scale_x', {
91 min: 0,
92 max: 1,
93 allow_padding: false,
94 });
95 scale_y = await create_model_bqscales(manager, 'LinearScale', 'scale_y', {
96 min: 2,
97 max: 3,
98 allow_padding: false,
99 });
100 }
101 // TODO: the default values for the ColorScale should not be required, but defined in the defaults method
102 const scale_color = await create_model_bqscales(
103 manager,
104 'ColorScale',
105 'scale_color',
106 { scheme: 'RdYlGn', colors: [] }
107 );
108 const scales = {
109 x: scale_x.toJSON(),
110 y: scale_y.toJSON(),
111 color: scale_color.toJSON(),
112 };
113 const color = null;
114 const size = null;
115 const opacity = null;
116 const rotation = null;
117 const skew = null;
118

Callers 5

scatter.tsFile · 0.90
coloraxis.tsFile · 0.90
figure.tsFile · 0.90
axis.tsFile · 0.90
interacts.tsFile · 0.90

Calls 5

create_modelFunction · 0.85
create_model_bqscalesFunction · 0.85
create_model_bqplotFunction · 0.85
create_viewFunction · 0.85
display_viewMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…