Class: Wandb::Plot

Inherits:
Object
  • Object
show all
Defined in:
lib/wandb.rb

Overview

Plot class

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(plot) ⇒ Plot

Returns a new instance of Plot.



280
281
282
# File 'lib/wandb.rb', line 280

def initialize(plot)
  @plot = plot
end

Class Method Details

.bar(table, label:, value:, title: nil, split_table: false) ⇒ Object



253
254
255
256
257
258
259
260
261
262
# File 'lib/wandb.rb', line 253

def bar(table, label:, value:, title: nil, split_table: false)
  py_plot = Wandb.__pyptr__.plot.bar(
    table: table.__pyptr__,
    label: label,
    value: value,
    title: title,
    split_table: split_table,
  )
  new(py_plot)
end

.histogram(table, value_key, title: nil) ⇒ Object



274
275
276
277
# File 'lib/wandb.rb', line 274

def histogram(table, value_key, title: nil)
  py_plot = Wandb.__pyptr__.plot.histogram(table.__pyptr__, value_key, title: title)
  new(py_plot)
end

.line(table, x_key, y_key, title: nil) ⇒ Object



264
265
266
267
# File 'lib/wandb.rb', line 264

def line(table, x_key, y_key, title: nil)
  py_plot = Wandb.__pyptr__.plot.line(table.__pyptr__, x_key, y_key, title: title)
  new(py_plot)
end

.scatter(table, x_key, y_key, title: nil) ⇒ Object



269
270
271
272
# File 'lib/wandb.rb', line 269

def scatter(table, x_key, y_key, title: nil)
  py_plot = Wandb.__pyptr__.plot.scatter(table.__pyptr__, x_key, y_key, title: title)
  new(py_plot)
end

Instance Method Details

#__pyptr__Object



284
285
286
# File 'lib/wandb.rb', line 284

def __pyptr__
  @plot.__pyptr__
end