-
Notifications
You must be signed in to change notification settings - Fork 965
Open
Description
I'm using ipywidget for metPy dewdrop calculator. But the sliders didn't show up when I run the code.
My Code:

import metpy.calc as mpcalc
from metpy.units import units
from ipywidgets import interact, FloatSlider, IntSlider
def dewpoint_calculator(temperature, rh):
temperature = temperature * units.degC
rh = rh * units.percent
return round(mpcalc.dewpoint_from_relative_humidity(temperature, rh).to('degC'), 1)
temp_slider = FloatSlider(min=0, max=100, step=0.5, value= 50)
rh_slider = IntSlider(min=0, max=100, value= 50)
interact(dewpoint_calculator, temperature=temp_slider, rh =rh_slider);
Metadata
Metadata
Assignees
Labels
No labels
