How to format seaborn/matplotlib axis tick labels from number to thousands or Millions? (125,436 to 125.4K)

import matplotlib.pyplot as plt import matplotlib.ticker as ticker import seaborn as sns import pandas as pd sns.set(style="darkgrid") fig, ax = plt.subplots(figsize=(8, 5)) palette = sns.color_palette("bright", 6) g = sns.scatterplot(ax=ax, x="Area", y="Rent/Sqft", hue="Region", marker='o', data=df, s=100, palette= palette) g.legend(bbox_to_anchor=(1, 1), ncol=1) g.set(xlim = (50000,250000)) How can I can change the axis format from a number to … Read more

Changing position of vertical (z) axis of 3D plot (Matplotlib)?

I’m doing some 3D surface plots using Matplotlib in Python and have noticed an annoying phenomenon. Depending on how I set the viewpoint (camera location), the vertical (z) axis moves between the left and right side. Here are two examples: Example 1, Axis left, Example 2, Axis right. The first example has ax.view_init(25,-135) while the second has ax.view_init(25,-45).