Hi,
I appreciate the feedback. But this seems like a lot of work just to
add a few lines. Nonetheless, I'll try it.
Thanks,
Walt
________________________
Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
________________________
(V) 609-936-8999
(F) 609-936-3733
walt(a)dataanalyticscorp.com
_____________________________________________________
On 3/24/2011 12:00 PM, gretl-users-request(a)lists.wfu.edu wrote:
Send Gretl-users mailing list submissions to
gretl-users(a)lists.wfu.edu
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.wfu.edu/mailman/listinfo/gretl-users
or, via email, send a message with subject or body 'help' to
gretl-users-request(a)lists.wfu.edu
You can reach the person managing the list at
gretl-users-owner(a)lists.wfu.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gretl-users digest..."
Today's Topics:
1. Drawing lines on a scatter plot (Allin Cottrell)
2. Re: Drawing lines on a scatter plot (Allin Cottrell)
----------------------------------------------------------------------
Message: 1
Date: Wed, 23 Mar 2011 15:06:05 -0400 (EDT)
From: Allin Cottrell<cottrell(a)wfu.edu>
Subject: [Gretl-users] Drawing lines on a scatter plot
To: Gretl users<gretl-users(a)lists.wfu.edu>
Message-ID:<Pine.A41.4.58.1103231504480.393216@f1n11.sp2net.wfu.edu>
Content-Type: TEXT/PLAIN; charset=US-ASCII
I'm forwarding this (which got bounced by mistake).
Allin Cottrell
Date: Wed, 23 Mar 2011 13:32:43 -0400
From: Data Analytics Corp.<walt(a)dataanalyticscorp.com>
To: gretl-users(a)lists.wfu.edu
Subject: Drawing lines on a scatter plot
Hi,
I created a simple scatter plot of the log of sales (l_Sales) on the
vertical axis and the log of price (l_Price) on the horizontal. Now I
want to draw a vertical line and a horizontal line, both at their
respective means. I tried to edit the graph and add a line using the
Lines tab. I enter a formula such as mean(l_Price). But I got an
error: How can I add the lines? Any suggestions are appreciated.
Thanks,
Walt
________________________
Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
________________________
(V) 609-936-8999
(F) 609-936-3733
walt(a)dataanalyticscorp.com
www.dataanalyticscorp.com
_____________________________________________________
------------------------------
Message: 2
Date: Wed, 23 Mar 2011 15:27:51 -0400 (EDT)
From: Allin Cottrell<cottrell(a)wfu.edu>
Subject: Re: [Gretl-users] Drawing lines on a scatter plot
To: Gretl list<gretl-users(a)lists.wfu.edu>
Message-ID:<Pine.A41.4.58.1103231517040.393216@f1n11.sp2net.wfu.edu>
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Wed, 23 Mar 2011, Walt wrote:
> I created a simple scatter plot of the log of sales (l_Sales) on the
> vertical axis and the log of price (l_Price) on the horizontal. Now I
> want to draw a vertical line and a horizontal line, both at their
> respective means. I tried to edit the graph and add a line using the
> Lines tab. I enter a formula such as mean(l_Price). But I got an
> error: How can I add the lines? Any suggestions are appreciated.
Formulas entered via the GUI graph editor are fed directly to
gnuplot, which doesn't know about "l_Price". However,
(a) You can add the y-mean by looking up that variable's summary
statistics in gretl and using the graph editor to add a line at
that value. For example, if the y-mean is 3.65, just enter a
"formula" of "3.65".
(b) Adding the x-mean (a vertical line) is more awkward and you'll
probably have to edit the gnuplot commands. (Save the graph "as an
icon" then right-click the icon.) One way is to append a plot
"line" using a single data-point, with x-value equal to the x-mean
and y-value equal to the natural height of the graph. Here's an
example, based on a scatter plot of price against sqft from
gretl's data4-1:
Before addition of vertical line:
plot \
'-' using 1:($2) notitle w points, \
52.35090729 + 0.1387503195*x title "Y = 52.4 + 0.139X" w lines, \
317.49 title "mean(price)" w lines lt 3
1065 199.9
1254 228
[...]
e
After addition:
plot \
'-' using 1:($2) notitle w points, \
52.35090729 + 0.1387503195*x title "Y = 52.4 + 0.139X" w lines, \
317.49 title "mean(price)" w lines lt 3, \
'-' using 1:2 title "mean(sqft)" w impulses lt 3
1065 199.9
1254 228
[...]
e
1910.9 550
e
In gnuplot "e" on a line by itself signals the end of an inline
data block.
Allin Cottrell
------------------------------
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
End of Gretl-users Digest, Vol 50, Issue 31
*******************************************