I am trying to scale the axes on my plot from 0 to 1 but following the progression of the sin function over that interval. I need to do this to get an even data distribution for my graph.
I have attempted to use the FuncScale operator but to no avail.
import numpy as np
import matplotlib.pyplot as plt
import random as rand
#Define radius and angle
r = np.arange(0,5,0.0001)
a = np.arange(0, np.pi/2 ,(np.pi/100000))#[:-1]
print(len(r))
print(len(a))
#x = r * np.cos(a)
#y = r * np.sin(a)
#Generate random integer list and zip with radii and angles
samp=50000
q = rand.sample(range(samp),samp)
qrzip = zip(r,q)
u = rand.sample(range(samp),samp)
uazip = zip(a,u)
#Turn tuples back into list
qr = list(qrzip)
ua = list(uazip)
# Sort with lambda function
qr.sort(key=lambda x: x[1])
ua.sort(key=lambda x: x[1])
#Form lists of radii and angles in random order
qrr = [qrr[0] for qrr in qr]
uaa = [uaa[0] for uaa in ua]
#Define variables
cos = qrr*np.cos(uaa)
sin = qrr*np.sin(uaa)
plt.plot(cos, sin,'g,')
plt.xlim(0, 5)
plt.ylim(0, 5)
plt.gca().set_aspect('equal', adjustable='box')
plt.draw()
The function plots on a normal integer scale but I want it to plot on the scale sin(0,1)