rotating two lines around an origin in python : I have two lines which meet around origin z and y, listed below. When I plot these according to certain functions I get the attached plot. 

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    origin_z = 260
    origin_y = 244

    plt.plot(phi_z+origin_z,phi_y+origin_y,'b')
    plt.plot(phi_z+origin_z,phi_y+origin_y,'r')

<!-- end snippet -->

Where phi_z and _y are some functions (which I have avoided posting for the sake of clarity). I want to rotate both lines about 45 degrees clockwise around the specified origin [image of lines][1], but when I try the following code, it merely shifts the lines further along each axis rather than rotating them:

<!-- begin snippet: js hide: false console: true babel: false -->

<!-- language: lang-html -->

    phi_z_rot = origin_z + np.cos(45) * (phi_z - origin_z) - np.sin(45) * (phi_z - origin_z)
    phi_y_rot = origin_y + np.cos(45) * (phi_y - origin_y) - np.sin(45) * (phi_y - origin_y)

<!-- end snippet -->

Can anyone tell me what I'm doing wrong? Sorry for not posting more of the functions, but hopefully it isn't necessary. 

  [1]: https://i.stack.imgur.com/misJP.png