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.

  • $\begingroup$ 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? $\endgroup$
    – hardmath
    Commented Apr 6, 2015 at 0:50
  • $\begingroup$ 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') $\endgroup$
    – nicoguaro
    Commented May 5, 2015 at 22:55

1 Answer 1


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.