I have a scatter plot where I need to shade the Ramachandran allowed regions for aminoacids. I know there is a function that plots them for you, but it is not helpful for my case since I need the regions in my plot and this function opens a new figure.
Is there a reason you can't just call that function and then plot your scatter plot on the figure it creates?
Otherwise you could either open up the existing function that plots the Ramachandran regions and copy/modify the relevant parts to do what you want or you could copy the data out of the plotted objects (using the get
function, see this link) and re-plot it however you want.
getpdb('1a22','ToFile','1a22.pdb'); Struct1a22 = getpdb('1a22'); ramachandran(Struct1a22,'glycine',true,'regions',true); hold on; plot([-90, -45, 0, 45, 90],[-90, -45, 0, 45, 90],'ob',... 'MarkerFaceColor','b')
$\endgroup$ – nicoguaro♦ May 5 '15 at 22:55