This program must take in a variable passed from the widget and turn it into a chart. The input is known as num_var and it is the variable you must use to get the data and build a chart. The output must return a HoloViews Chart.
(num_var)
| 726 | transparent = 0.5 |
| 727 | |
| 728 | def select_variable_to_plot(num_var): |
| 729 | """ |
| 730 | This program must take in a variable passed from the widget and turn it into a chart. |
| 731 | The input is known as num_var and it is the variable you must use to get the data and build a chart. |
| 732 | The output must return a HoloViews Chart. |
| 733 | """ |
| 734 | color = next(colors) |
| 735 | xlimi = (dft[num_var].min(), dft[num_var].max()) |
| 736 | hv_look = hv.Distribution(np.histogram(dft[num_var]), num_var).opts(color=color, |
| 737 | height=height_size, |
| 738 | width=width_size, |
| 739 | alpha=transparent, |
| 740 | title='KDE (Distribution) Plot of Numeric Variables').redim.range( |
| 741 | num_var=xlimi) |
| 742 | return hv_look |
| 743 | |
| 744 | ####### This is where you call the widget and pass it the select_variable to draw a Chart ####### |
| 745 | dmap = hv.DynamicMap(select_variable_to_plot, kdims=['Select_Variable']).redim.values( |
nothing calls this directly
no outgoing calls
no test coverage detected