I am trying to rotate the starting figure 45 degrees instead of a square I have a diamond-shaped fig, I used this code
# import the packages
import matplotlib.pyplot as plt
from matplotlib.transforms import Affine2D
import mpl_toolkits.axisartist.floating_axes as floating_axes
# set the figure size
plt.rcParams["figure.figsize"] = [7.00, 3.50]
plt.rcParams["figure.autolayout"] = True
# plot the figure
fig = plt.figure()
scales = (0, 5, 0, 5)
# Add 2D affine transformation
t = Affine2D().rotate_deg(25)
# Add floating axes
h = floating_axes.GridHelperCurveLinear(t, scales)
ax = floating_axes.FloatingSubplot(fig, 111, grid_helper=h)
fig.add_subplot(ax)
plt.show()
and I got back a this diamond-shaped plot but the classic functions now don't work on the new shape (tick_params and ax.spines don't work) plus when I draw on some scatterpoints they are not plotted correctly.
My question is how do I rotate the plot 45 degrees to get a diamond-shaped fig that has the functions working, and then how do I rotate my datapoints to fit the new shape ? thanks