<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <tt>Hi Matt,<br>
      I can't install <b>wxmplot</b>, not in Ubuntu repositories and
      pip gives:<br>
      <i>Command "python setup.py egg_info" failed with error code 1 in
        /tmp/pip-build-Ch6MUi/wxmplot/<br>
        ??<br>
      </i>rph-r<i><br>
      </i><br>
      <br>
    </tt><br>
    <div class="moz-cite-prefix">Le 18.05.20 à 15:59, Matt Newville a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+7ESbq_hgmam76D_mVt0rF3w1wbB2mgVVLZrdwd+cYn=+=Nvw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div class="gmail_default"
            style="font-family:arial,helvetica,sans-serif">Raphael,</div>
          <div class="gmail_default"
            style="font-family:arial,helvetica,sans-serif"><br>
          </div>
          <div class="gmail_default"
            style="font-family:arial,helvetica,sans-serif">Depending on
            your needs, you might find wxmplot useful.  This supports
            non-blocking, interactive 2D plots and image display from a
            terminal Python or IPython session.  As the name might
            imply, it requires wxPython but is installed with `pip
            install wxmplot` if your Linux Python has wxPython available
            (Anaconda Python does).  With this installed, you can do</div>
          <div class="gmail_default"
            style="font-family:arial,helvetica,sans-serif"><span
              style="font-family:Arial,Helvetica,sans-serif"><br>
            </span></div>
          <div class="gmail_default"
            style="font-family:arial,helvetica,sans-serif"><span
              style="font-family:Arial,Helvetica,sans-serif">   
              >>> import numpy as np</span><br>
          </div>
          <span class="gmail_default"
            style="font-family:arial,helvetica,sans-serif">   
            >>> </span>import wxmplot.interactive as wi<br>
          <span class="gmail_default"
            style="font-family:arial,helvetica,sans-serif">   
            >>> </span>x = np.linspace(0, 20, 101)<br>
          <span class="gmail_default"
            style="font-family:arial,helvetica,sans-serif">   
            >>> </span>wi.plot(x, np.sin(x), xlabel='t<span
            class="gmail_default"
            style="font-family:arial,helvetica,sans-serif"> (s)</span>'<span
            class="gmail_default"
            style="font-family:arial,helvetica,sans-serif"></span>)<br>
          <span class="gmail_default"
            style="font-family:arial,helvetica,sans-serif">   </span><wxmplot.interactive.PlotDisplay
          at 0x10db88678>
          <div><span style="font-family:arial,helvetica,sans-serif"><span
                class="gmail_default"
                style="font-family:arial,helvetica,sans-serif">    </span>>>> <span
                class="gmail_default"
                style="font-family:arial,helvetica,sans-serif">wi.plot(x,
                np.cos(x)*np.exp(-x/10))</span></span></div>
          <div><span style="font-family:arial,helvetica,sans-serif"><span
                class="gmail_default"
                style="font-family:arial,helvetica,sans-serif"> </span></span><span
              class="gmail_default"
              style="font-family:arial,helvetica,sans-serif">  </span><wxmplot.interactive.PlotDisplay
            at 0x10db88678></div>
          <div><br>
            <div class="gmail_default"
              style="font-family:arial,helvetica,sans-serif">The first
              plot() there will show an interactive display of the plot
              and return the prompt.  The second plot() here add the
              trace on top of the first (you can add optional arguments
              to open a second plot window or draw to right-hand axes). 
              The plot windows have drag-and-zoom and many configuration
              options for colors, themes, etc available after the plot
              has been displayed.  There is also a
              `wxmpot.interactive.imshow()` to show an interactive
              false-color image of 2D data.   <span
                style="font-family:Arial,Helvetica,sans-serif">See </span><a
href="https://newville.github.io/wxmplot/interactive.html"
                style="font-family:Arial,Helvetica,sans-serif"
                moz-do-not-send="true">https://newville.github.io/wxmplot/interactive.html</a><span
                style="font-family:Arial,Helvetica,sans-serif"> for more
                details.</span></div>
            <div class="gmail_default"
              style="font-family:arial,helvetica,sans-serif"><br>
            </div>
            <div class="gmail_default"
              style="font-family:arial,helvetica,sans-serif">Of course,
              these do not do everything available in matplotlib, but if
              you are doing basic 2D line plots or image display they
              should go a long way.  And you can grab that return value
              and its `PlotDisplay.panel.axes` (a matplotlib Axes) and
              `PlotDisplay.panel.fig` (a matplotib Figure) if you want
              to do more complicated things.  </div>
            <div class="gmail_default"
              style="font-family:arial,helvetica,sans-serif"><br>
            </div>
          </div>
          <div class="gmail_default"
            style="font-family:arial,helvetica,sans-serif">--Matt</div>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Mon, May 18, 2020 at 3:43
            AM Raphael Raccuia <<a
              href="mailto:rafael.raccuia@blindekinder.com"
              moz-do-not-send="true">rafael.raccuia@blindekinder.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">Hi,<br>
            Any chance  to use matplotlib in a linux shell terminal?<br>
            <br>
            if I make 'python3 my/script.py', it displays the plot but I
            have no <br>
            prompt >>>.<br>
            It works in Idle.<br>
            That would be my test script:<br>
            <br>
            #!/usr/bin/env python3 #otherwise loads a 'ghost': cursor
            turn to cross, <br>
            but no window.<br>
            <br>
            import matplotlib<br>
            print(matplotlib.get_backend()) #print TkAgg in the terminal<br>
            <br>
            import matplotlib.pyplot as plt<br>
            <br>
            plt.ion()<br>
            <br>
            <br>
            plt.plot([1, 2, 3, 4], [1, 4, 2, 3])<br>
            <br>
            plt.show(block=True) #block=True: othewise it close
            immediately plot and <br>
            terminal<br>
            <br>
            thank you!<br>
            <br>
            rph-r<br>
            <br>
            <br>
            _______________________________________________<br>
            Matplotlib-users mailing list<br>
            <a href="mailto:Matplotlib-users@python.org" target="_blank"
              moz-do-not-send="true">Matplotlib-users@python.org</a><br>
            <a
              href="https://mail.python.org/mailman/listinfo/matplotlib-users"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
          </blockquote>
        </div>
        <br clear="all">
        <div><br>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>