mailr26947 - /branches/nmrglue/test_suite/system_tests/nmrglue.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by tlinnet on December 03, 2014 - 22:00:
Author: tlinnet
Date: Wed Dec  3 22:00:49 2014
New Revision: 26947

URL: http://svn.gna.org/viewcvs/relax?rev=26947&view=rev
Log:
Moved changing of matplotlib axis properties in systemtests of Nmrglue.

Task #7873 (https://gna.org/task/index.php?7873): Write wrapper function to 
nmrglue, to read .ft2 files and process them.
Homepage: http://www.nmrglue.com/
Link to nmrglue discussion: 
https://groups.google.com/forum/#!forum/nmrglue-discuss
The code is develop at Github: https://github.com/jjhelmus/nmrglue/
Documentation: http://nmrglue.readthedocs.org/en/latest/index.html

Modified:
    branches/nmrglue/test_suite/system_tests/nmrglue.py

Modified: branches/nmrglue/test_suite/system_tests/nmrglue.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/nmrglue/test_suite/system_tests/nmrglue.py?rev=26947&r1=26946&r2=26947&view=diff
==============================================================================
--- branches/nmrglue/test_suite/system_tests/nmrglue.py (original)
+++ branches/nmrglue/test_suite/system_tests/nmrglue.py Wed Dec  3 22:00:49 
2014
@@ -52,13 +52,6 @@
         # Call setup function.
         self.setup_plot_contour(show=False)
 
-        # Set new limits.
-        ds.ax.set_xlim(30, 0)
-        ds.ax.set_ylim(15, -20)
-
-        # add some labels
-        ds.ax.text(25.0, 0.0, "Test", size=8, color='r')
-
         # Now show
         plt.show()
 
@@ -101,7 +94,14 @@
         self.interpreter.spectrum.nmrglue_read(file=fname, dir=ds.ng_test, 
spectrum_id=sp_id)
 
         # Call the pipe_control function and get the return axis.
-        ds.ax = plot_contour(spectrum_id=sp_id, ppm=True, show=show)
+        ax = plot_contour(spectrum_id=sp_id, ppm=True, show=show)
+
+        # Set new limits.
+        ax.set_xlim(30, 0)
+        ax.set_ylim(15, -20)
+
+        # add some labels
+        ax.text(25.0, 0.0, "Test", size=8, color='r')
 
 
     def setup_plot_contour_cpmg(self, show=False):
@@ -125,10 +125,10 @@
         self.interpreter.spectrum.nmrglue_read(file=fname, dir=ft2_folder_1, 
spectrum_id=sp_id)
 
         # Call the pipe_control function and get the return axis.
-        ds.ax = plot_contour(spectrum_id=sp_id, contour_start=200000., 
contour_num=20, contour_factor=1.20, ppm=True, show=show)
+        ax = plot_contour(spectrum_id=sp_id, contour_start=200000., 
contour_num=20, contour_factor=1.20, ppm=True, show=show)
 
         # Set a new title.
-        ds.ax.set_title("CPMG Spectrum")
+        ax.set_title("CPMG Spectrum")
 
 
     def test_nmrglue_read(self):




Related Messages


Powered by MHonArc, Updated Wed Dec 03 22:20:01 2014