Pymat

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Leeny

    Pymat

    Hi Group,

    Hope someone can help me with this problem. I am a new user to python
    and am currently working with pymat module of python.

    I tried to create plots thru pymat using pymat.eval(h, 'plot(x,y)')
    This is working fine. However, i dont know how to print or save this
    plot as a .tif image something like

    print(gcf, '-dtiff', 'test')

    using pymat.

    Please help me!!!!

    Thanks
    Leeny
  • Leeny

    #2
    Python - matlab interface help!! Urgent

    leens_chacko@ho tmail.com (Leeny) wrote in message news:<ca305c70. 0403311357.3d43 6b2b@posting.go ogle.com>...[color=blue]
    > Hi Group,
    >
    > Hope someone can help me with this problem. I am a new user to python
    > and am currently working with pymat module of python (for coursework).
    >[/color]
    [color=blue]
    > I tried to create plots thru pymat using pymat.eval(h, 'plot(x,y)')
    > This is working fine. However, i dont know how to print or save this
    > plot as a .tif image something like
    >
    > print(gcf, '-dtiff', 'test')
    >
    > using pymat.[/color]
    One suggestion I got was to use mathplotlib, but since i have done
    some work uisng pymat, I would like to know if there is some way it
    can be done using Pymat.[color=blue]
    >
    > Please help me!!!!
    >
    > Thanks
    > Leeny[/color]

    Comment

    • Albert Hofkamp

      #3
      Re: Python - matlab interface help!! Urgent

      On 16 Apr 2004 07:42:04 -0700, Leeny <leens_chacko@h otmail.com> wrote:[color=blue]
      > leens_chacko@ho tmail.com (Leeny) wrote in message news:<ca305c70. 0403311357.3d43 6b2b@posting.go ogle.com>...[color=green]
      >> Hi Group,
      >>
      >> Hope someone can help me with this problem. I am a new user to python
      >> and am currently working with pymat module of python (for coursework).
      >>[/color]
      >[color=green]
      >> I tried to create plots thru pymat using pymat.eval(h, 'plot(x,y)')
      >> This is working fine. However, i dont know how to print or save this
      >> plot as a .tif image something like
      >>
      >> print(gcf, '-dtiff', 'test')
      >>
      >> using pymat.[/color]
      > One suggestion I got was to use mathplotlib, but since i have done
      > some work uisng pymat, I would like to know if there is some way it
      > can be done using Pymat.[/color]

      The last parameter of eval is the literal matlab command as a string (ie
      quotes before and after it).

      In other words if you type XYZ to do it in matlab, then the pymat
      equivalent is pymat.eval(h,'X YZ')

      If you have ' inside XYZ, use " instead, like pymat.eval(h,"X YZ") .



      So, if the print command is how to print something, do

      pymat.eval(h,"p rint(gcf, '-dtiff', 'test')")


      Albert
      --
      Unlike popular belief, the .doc format is not an open publically available format.

      Comment

      Working...