Building 2 KDE seabed sections in a row

Is there a way to build two KDE co-location sites side by side? I was able to display almost all types of graphs that sea boats can create using something like this:

power_t_series = sDF.pitch velocity_t_series = sDF.velocity duration_t_series = sDF.duration figure, axes = plt.subplots(nrows=1, ncols=2) figure.set_size_inches(20,10) b, g = sns.color_palette("muted", 2) sns.tsplot(power_t_series, color = b, ax=axes[0]) sns.distplot(power_t_series, color = r, ax=axes[1]) 

But when specifying sharing, top to bottom is the only way to display multiple charts of this nature? Here is the code and the error:

 figure, axes = plt.subplots(nrows=1, ncols=2) figure.set_size_inches(20,10) b, g = sns.color_palette("muted", 2) sns.jointplot(power_t_series, velocity_t_series, kind='kde', ax=axes[0]) sns.jointplot(power_t_series, duration_t_series, kind='kde', ax=axes[1]) 

I get this:

  3 b, g = sns.color_palette("muted", 2) 4 ----> 5 sns.jointplot(power_t_series, velocity_t_series, kind='kde', ax=axes[0]) 6 sns.jointplot(power_t_series, duration_t_series, kind='kde', ax=axes[1]) TypeError: jointplot() got an unexpected keyword argument 'ax' 

Is there any way to build this type of chart side by side since ax is not an argument accepted by joint ()?

+6
source share
1 answer

jointplot is a level-level function and cannot coexist on a figure with other graphs, but there is a kdeplot function that can draw a 2nd KDE on certain axes. See this example .

+6
source

Source: https://habr.com/ru/post/975262/


All Articles