Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #102388

Re: ts.plot() pandas: No plot!

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Jason Swails <jason.swails@gmail.com>
Newsgroups comp.lang.python
Subject Re: ts.plot() pandas: No plot!
Date Mon, 1 Feb 2016 09:18:41 -0500
Lines 39
Message-ID <mailman.3.1454336323.3032.python-list@python.org> (permalink)
References <n8m9sb$6ss$1@gioia.aioe.org> <mailman.179.1454291031.2338.python-list@python.org> <n8mem0$ba2$1@gioia.aioe.org>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-Trace news.uni-berlin.de sqSWVRnov2Mi9ZfGwHJghgov3RMxkIARPCvxJwiYIr/w==
Return-Path <jason.swails@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'value,': 0.03; 'canvas': 0.07; 'cc:addr:python-list': 0.09; 'subject:plot': 0.09; 'jan': 0.11; 'backend': 0.15; '2016': 0.16; 'cc:name:python list': 0.16; 'interacting': 0.16; 'magic': 0.16; 'paulo': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'pfxlen:0': 0.18; 'typing': 0.18; 'widget': 0.18; '&gt;': 0.18; 'gui': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; '(the': 0.22; '31,': 0.22; 'lawrence': 0.22; 'this:': 0.23; 'import': 0.24; 'header:In- Reply-To:1': 0.24; "i've": 0.25; 'command': 0.26; 'checking': 0.27; 'message-id:@mail.gmail.com': 0.27; 'function': 0.28; 'embed': 0.29; 'matplotlib': 0.29; 'received:google.com': 0.35; 'jason': 0.35; 'saved': 0.35; 'quite': 0.35; 'needed': 0.36; 'received:209.85': 0.36; 'data.': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'skip:& 10': 0.37; 'thanks': 0.37; 'received:209.85.213': 0.37; 'things': 0.38; '(with': 0.38; 'received:209': 0.38; 'whatever': 0.39; 'mark': 0.40; 'saw': 0.77; 'plots': 0.84; 'window,': 0.84; 'notebook': 0.96
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=m7smAvDuOvvz1auWzEn+raaLLpjwH3DBFjn48sIsHFQ=; b=CkJag0FuyfZB9S7TcCWRjWh0L3H0up6iAJsyzz7KF50LaZBbxgI6cY8aUNAnGDZ5KC 4hYej6U26EGXFKzRd27IewP+MgTqsSBktunBXLipBbWIqTSE1GpPbqXwk3unUs8NsI5c yIwyDn2V+uNL+k+SNvFH2G1RGBglmKm6xiAt/u3G3ONK7USkFENC9BajjvTUuyR+W0/x 9fiK1I7Ezgxz02MaSLi4ERaZ1oMkq6YhFeErhMn5W0gqX2il1tZrIib+3Wswbv7T75oS HXIr0RMaUCr3J04vAVzKUc0Ur+bhXsN8d6DntUzzeTgo9NNSi9kVIcw5LBlAa1FkY752 jNgw==
X-Google-DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=m7smAvDuOvvz1auWzEn+raaLLpjwH3DBFjn48sIsHFQ=; b=OcHXYbfxzF+uxYvYbDlKPfxXlY2f86ZEfE7kuNOBrdIglDB/fau0JsGS8hWtbwjhJ5 cpjiRoX4MDzM33+NhV1B31VFgqFKr9PTtghzKTsTZsSzfZ6q0EcmNgOEHeic0DnKoeSG TlYaDeUy0uy6YO663H4VsOOQyW6MzkjlChL11CCrtNuuktUSeJm4jb2R/F8xYgIGylnG y4sLBGzE0siKh3de9K7cOJ3cr5tJSngYHTx6iA7OVVsDt6LAtFMds+DcXM5/l13T4Q04 4spKV+9QA1nzM08k+0rA6Evi6s6S5Lb+jZILKDVtI4BdJduNVOSnsukGMWbFmx2Pwbxa Ja6w==
X-Gm-Message-State AG10YOR+NwKHswIgaD5ypY+XdmiG8vEdmxW1G2YCGZQklNkq1xeKxa70mEDwB03Rwm+fu2BXUpvCwQQAJ704Aw==
X-Received by 10.31.134.4 with SMTP id i4mr16137955vkd.153.1454336321255; Mon, 01 Feb 2016 06:18:41 -0800 (PST)
In-Reply-To <n8mem0$ba2$1@gioia.aioe.org>
X-Content-Filtered-By Mailman/MimeDel 2.1.20+
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Xref csiph.com comp.lang.python:102388

Show key headers only | View raw


On Sun, Jan 31, 2016 at 9:08 PM, Paulo da Silva <
p_s_d_a_s_i_l_v_a_ns@netcabo.pt> wrote:

> Às 01:43 de 01-02-2016, Mark Lawrence escreveu:
> > On 01/02/2016 00:46, Paulo da Silva wrote:
> ...
>
> >>
> >
> > Is it as simple as adding a call to ts.show() ?
> >
> Thanks for the clue!
> Not so simple however.
> Needed to do
> import matplotlib.pyplot as plt
> plt.show()
>

​What you saw ts.plot() return was the matplotlib artists (the things that
will be drawn on whatever "canvas" is provided -- either saved to an image
or drawn to a GUI widget).  So whenever you see this kind of return value,
you know you need to call the matplotlib.pyplot.show function in order to
generate a canvas widget (with whatever backend you choose) and draw it.

If you want to do this kind of interactive plotting (reminiscent, I've
heard, of Matlab), I would highly recommend checking out IPython.  You can
use IPython's notebook or qtconsole and embed plots from matplotlib
directly in the viewer.  For example, try this:

ipython qtconsole

This opens up a window, then use the magic command "%matplotlib inline" to
have all plots sent directly to the ipython console you are typing commands
in.  I've found that kind of workflow quite convenient for directly
interacting with data.

HTH,
Jason

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

ts.plot() pandas: No plot! Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-02-01 00:46 +0000
  Re: ts.plot() pandas: No plot! Chris Angelico <rosuav@gmail.com> - 2016-02-01 12:15 +1100
    Re: ts.plot() pandas: No plot! Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-02-01 01:30 +0000
  Re: ts.plot() pandas: No plot! Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-02-01 01:43 +0000
    Re: ts.plot() pandas: No plot! Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-02-01 02:08 +0000
      Re: ts.plot() pandas: No plot! Jason Swails <jason.swails@gmail.com> - 2016-02-01 09:18 -0500
        Re: ts.plot() pandas: No plot! Paulo da Silva <p_s_d_a_s_i_l_v_a_ns@netcabo.pt> - 2016-02-01 19:22 +0000

csiph-web