# How can I plot the Ramachandran regions in MatLab?

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.

• I'm just musing as I don't have any familiarity with the plot command you mention, but perhaps the scatter plot could be more easily added to the shaded regions, rather than the other way round? – hardmath Apr 6 '15 at 0:50
• I'm not sure of understanding your question. But, just in case, I manage to plot two things in the same plot: 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') – nicoguaro May 5 '15 at 22:55

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.