neuniversity / ALY6140

1 stars 3 forks source link

subplot for bokeh #22

Open Iris0114 opened 5 years ago

Iris0114 commented 5 years ago

Hi all, I use the holoviews generate two boxplots. p1 = hv.BoxWhisker(tips, 'day', 'total_bill', label=title1) p2 = hv.BoxWhisker(tips, 'sex', 'total_bill', label=title2) Do you know how to subplot them to be side by side?

echolq012 commented 5 years ago

You can try p1 + p2, or use Axessubplot. For Axessubplot, it required to 'import matplotlib.pyplot as plt' and use 'fig, axes = plt.subplots(1,2, figsize())'.

heena007 commented 5 years ago

Hi Iris,

You can just concatenate the plots using + operator For example, if you have two boxandwhisker plots b1 and b2, doing b1 + b2 should plot these box plots side by side. Please let me know if you have any other questions for this.

xyz04 commented 5 years ago

Hi Iris,

You can use the symbol like"+"to operate it. For your problem, you have two boxandwhisker, which named p1 and p2, doing p1+p2 will show that box plots side by side. I hope it will be helpful to you.