Hi All,
I have a python program that i am running in PyMOL. This program utilizes
Matplotlib to plot some results, and i would like to have a Matplotlib
interactive window appear once the code has finished running.
For example, the part of my code to produce the plot:
from pymol import cmd
import sys
import subprocess
import numpy as np
import matplotlib.pyplot as plt
fig1, ax1 = plt.subplots()
ax1.plot([1,2,3], [1,2,3], 'bs')
ax2 = ax1.twinx()
ax2.plot([1,2,3], [1,2,3], 'r^')
fig1.tight_layout()
plt.show()
If i run this section of my code in a shell, the plot properly appears in
an interactive matplotlib window. However, when i have been running it in
the PyMOL Tcl-Tk GUI, nothing is appearing at all. If i run savefig(), the
plot saves, so i know that it is being created properly. Is there any way
to make the interactive matplotlib window appear when running the script
from PyMOL?
I recognize that this is a similar question to the question posted here:
https://sourceforge.net/p/pymol/mailman/message/26788523/
however, this was using pylab and i believe they were running it from a
shell, not directly in PyMOL to begin with, and the solution proposed
(using show()) is not working for me.
Thanks for your thoughts!
Rene
--
*Rene Francolini*
Carnegie Mellon University
M.S. Computational Biology 2016
B.S. Biological Sciences 2015
------
LinkedIn: www.linkedin.com/in/rfrancolini
Email: ren...@gm...
|