1

My code is:

figure1, axes = plt.subplots(2, 1, figsize=(10, 12))
#figure1.tight_layout(pad=4.0)

#Bar plot (Frequency vs Source) for Inflow
#sns.barplot(x="Pageviews", y="Source", data=top_15_src, ax=axes[0])


sns.barplot(y="Source", x="Pageviews", data=top_15_src,ax=axes[0])
axes[0].set_title('Number of clicks from each source')
axes[0].set_xlabel('Pageviews') 
axes[0].set_ylabel('Source')
axes[0] = plt.gca()


#Bar plot (Frequency vs Destination) for Outflow
sns.barplot(x="Pageviews", y="Destination", data=top_15_dest, ax=axes[1])

#sns.factorplot(y="Destination", x="Pageviews", kind='bar', data=top_15_dest, label="Total", ax = axes[1])
axes[1].set_title('Number of clicks to each destination')
axes[1].set_xlabel('Pageviews'); axes[1].set_ylabel('Destination')

Axes are NumPy arrays due to the subplots. I want to remove scientific notation only from the first plot. I tried this approach:

axes[0].get_xaxis().get_major_formatter().set_scientific(False)

But the exponential form (scientific notation) still persists. Here are the images of the plots.

Subplots of my code

azro
  • 53,056
  • 7
  • 34
  • 70

0 Answers0