// Fit and transform the visualizer (calls draw)
visualizer.fit(X, y, **kwargs)
visualizer.transform(X)
visualizer.finalize()
// Return the visualizer object
return visualizer
After Change
Returns the fitted, finalized visualizer
// Instantiate the visualizer
viz = FreqDistVisualizer(features, ax=ax, n=n, orient=orient, color=color, **kwargs)
// Fit and transform the visualizer (calls draw)
viz.fit(X, y, **kwargs)
viz.transform(X)
// Draw the final visualization
if show:
viz.show()
else:
viz.finalize()
// Return the visualizer object
return viz
class FrequencyVisualizer(TextVisualizer):