mailing-list for TeXmacs Users

Text archives Help


[TeXmacs] matplotlib within texmacs


Chronological Thread 
  • From: marc lalaude-labayle <address@hidden>
  • To: texmacs-users <address@hidden>
  • Subject: [TeXmacs] matplotlib within texmacs
  • Date: Tue, 11 Nov 2014 16:04:02 +0100

Hi,

with a recent svn compiled version of texmacs (don't know precisely which version), i can't get an image within the .tm file as showxn in the pdf and source tm attached files.

Note that i haven't tried this before, so i am not sure wether it is due to svn version or not.

I am following an INRIA mooc about python and wanted to use texmacs as a notebook such as ipython notebbok.


Thx for all your work.

Marc
<TeXmacs|1.99.2>

<style|<tuple|generic|french>>

<\body>
  <\session|python|default>
    <\output>
      Python 2.7.5+ (default, Feb 27 2014, 19:37:08)\ 

      [GCC 4.8.1]

      Python plugin for TeXmacs.

      Please see the documentation in Help -\<gtr\> Plugins -\<gtr\> Python

      \;
    </output>

    <\input>
      \<gtr\>\<gtr\>\<gtr\>\ 
    <|input>
      import matplotlib.pylab as plt
    </input>

    <\input>
      \<gtr\>\<gtr\>\<gtr\>\ 
    <|input>
      import numpy as np
    </input>

    <\unfolded-io>
      \<gtr\>\<gtr\>\<gtr\>\ 
    <|unfolded-io>
      np.sin(0)
    <|unfolded-io>
      0.0
    </unfolded-io>

    <\input>
      \<gtr\>\<gtr\>\<gtr\>\ 
    <|input>
      <code|t = np.arange(0.0, 2.0, 0.01)>
    </input>

    <\unfolded-io>
      \<gtr\>\<gtr\>\<gtr\>\ 
    <|unfolded-io>
      pi
    <|unfolded-io>
      Traceback (most recent call last):

      NameError: name 'pi' is not defined
    </unfolded-io>

    <\unfolded-io>
      \<gtr\>\<gtr\>\<gtr\>\ 
    <|unfolded-io>
      np.pi
    <|unfolded-io>
      3.14159265359
    </unfolded-io>

    <\input>
      \<gtr\>\<gtr\>\<gtr\>\ 
    <|input>
      s=np.sin(2*np.pi*t)
    </input>

    <\unfolded-io>
      \<gtr\>\<gtr\>\<gtr\>\ 
    <|unfolded-io>
      plt.plot(t,s)
    <|unfolded-io>
      [\<less\>matplotlib.lines.Line2D object at 0x2772350\<gtr\>]
    </unfolded-io>

    <\input>
      \<gtr\>\<gtr\>\<gtr\>\ 
    <|input>
      \;
    </input>
  </session>
</body>

Attachment: plt.pdf
Description: Adobe PDF document




Archive powered by MHonArc 2.6.19.

Top of page