mailRe: Import matplotlib in relax


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

Header


Content

Posted by Edward d'Auvergne on October 18, 2013 - 09:41:
Hi Troels,

It should be possible to get your matplotlib plotting code into the
relax library, just as the Grace plotting code is.  The Grace code is
at lib/software/grace.py.  Maybe I should create a new package called
lib.plotting and shift the Grace module there?  Then all the plotting
modules - grace, opendx, matplotlib, gnuplot, etc. - can sit together.
 New user functions can be created by copying user_functions.grace and
pipe_control.grace to user_functions.matplotlib and
pipe_control.matplotlib.  The pipe_control.matplotlib module simply
assembles the data from the relax data store and passes it into
lib.software.matplotlib for plotting.

As for the import error, could you copy and paste the full message?
This is not normal and it could have something to do with different
Python versions being used by relax and when you type 'python'.  Could
you run 'relax -i' and check that the Python binaries are identical?
Cheers.  It should be possible to have this running!

Regards,

Edward



On 18 October 2013 09:25, Troels Emtekær Linnet <tlinnet@xxxxxxxxxxxxx> wrote:
Hi Edward.

I am trying to plot some custom made graphs via matplotlib in relax.

Basically, I extract the r2 values for each spin, and plot them.

But I get a package error when I do

import matplotlib.pyplot as plt

It is a dateutil error? And I am not able to pinpoint the error.

I have checked that I can do the import in my normal python installation.

My current solution is to extract the wanted values from relax into a
dictionary, and dump the dictionary in json format.

Then make a normal python script, that reads the json dictionary, and plot
the values.

I would be interested to hear if you have the same problem importing
matplotlib in relax, or if it is only my setup?

Can this be fixed?

Another solution could be to open a dumped relax saved state in a python
section and run through the data.
Is it possible to do this?

Best
Troels


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-devel




Related Messages


Powered by MHonArc, Updated Mon Oct 21 14:40:09 2013