To remove widget for the histograms

This code generates widgets for both the map(geo) and histograms.
I want to remove widget for the histograms.
How can I do that ?

subset_dfi = subset_df.interactive(sizing_mode='stretch_width')
date_subrange = pn.widgets.DateRangeSlider(
    name='Date', start=subset_df.index[-1], end=subset_df.index[0], bar_color='orange'
)

mag_subrange = pn.widgets.FloatSlider(name='Minimum Magnitude', start=4, end=9, value=6)

filtered_subrange = subset_dfi[
    (subset_dfi.Mag   > mag_subrange) &
    (subset_dfi.index >= date_subrange.param.value_start) &
    (subset_dfi.index <= date_subrange.param.value_end)]

geo = filtered_subrange.hvplot(
    'x', 'y', color='orange', kind='points', hover_cols=['Date', 'Mag','Derinlik' ],
      width=1000,height=530,size=42, xlim=(2668476,5185476),ylim=(4092472, 5389472  ), tiles='ESRI').opts(tools=[hover]) 

filtered_subrange.hvplot(y='Mag',   kind='hist', responsive=True, min_height=200)

regards

The interactive accessors have something we call “termination methods”. These are methods that terminate the interactive pipeline and return some object you can render. If you leave an interactive pipeline unterminated and display it, this is the same as calling the .layout() termination method (i.e. you are given a layout of the widgets and the view you are rendering). If you want just the actual output you can call the .output() method, e.g. in your case you could do:

filtered_subrange.hvplot(y='Mag',   kind='hist', responsive=True, min_height=200).output()
1 Like

Philipp, Thank you for your great explanation…

1 Like