plotly_gtk.utils.round_sf

plotly_gtk.utils.round_sf(val, sf=1)

Round to specified significant figures.

Parameters:
  • val (float | int) – The value to be rounded

  • sf (int) – The number of significant figures

Returns:

The rounded value

Return type:

float