[gradsusr] [non-nasa source] [EXTERNAL] Add regression line to scatter plot

Adams, Jennifer M. (GSFC-610.2)[ADNET SYSTEMS INC] jennifer.m.adams at nasa.gov
Tue Oct 8 14:31:58 EDT 2019


Hi, Emily –
What exactly is your question?

--
Jennifer Miletta Adams
ADNET Systems, Inc.
NASA/GSFC, Code 610.2
Building 32, Room S159
(301) 614-6070


From: gradsusr <gradsusr-bounces at gradsusr.org> on behalf of "Saunders, Emily (GSFC-610.1)[SCIENCE SYSTEMS AND APPLICATIONS INC]" <emily.saunders at nasa.gov>
Reply-To: GrADS Users Forum <gradsusr at gradsusr.org>
Date: Tuesday, October 1, 2019 at 9:59 AM
To: "gradsusr at gradsusr.org" <gradsusr at gradsusr.org>
Subject: [non-nasa source] [EXTERNAL] [gradsusr] Add regression line to scatter plot

Hello all,

I have a question about adding a linear regression line to a scatter plot using the ‘sregr’ command. Here is a sample of the script I created:

'set lat 54 60'
'set lon -120 -110'
*'define a=o3*1e9'
'define a = ave(o3*1.0e9, time='d_start''timestring', time='d_end''timestring')'
say 'define a = ave(o3*1.0e9, time='d_start''timestring', time='d_end''timestring')'
'set vrange 0 60'
*'define b=pm25_rh35_gcc'
'define b = ave(pm25_rh35_gcc, time='d_start''timestring', time='d_end''timestring')'
say 'define b = ave(pm25_rh35_gcc, time='d_start''timestring', time='d_end''timestring')'
'set vrange 0 1200'
'set gxout scatter'
'set cmark 2'
'set cthick 12'
'set ccolor 9'
    titlepm25gcc = 'Surface_O3_and_PM25_Scatter_plot'
    diagnostic = 'Surface'
    location = 'Alberta'
    type = 'Scatter'
    imagenamepm25gcc = diagnostic'.'location'.NRT.'fieldnamepm25gcc'.scatter_plot.('d_start':'d_end').'MM'.'DD'.'YYYY'.png'
'd b;a'
*'set time 'timestring
*'set lat 54 60'
*'set lon -120 -110'
*'set gxout line'
*'set z 1'
*'set t 1'
*'set cmark 0'
*'set cthick 12'
*'set ccolor 0'
*'set cstyle 0'
*'set line 1 1 5'
*'d sregr(b, a, lon=-120, lon=-110, lat=54, lat=60)'

Thanks for your help in advanced.

Emily Saunders, PhD.
Senior Research Scientist
Global Modeling and Assimilation Office/SSAI
NASA Goddard Space Flight Center Bldg 33, Room B-227B
Code 610.1, Greenbelt, MD, 20771
Phone: +1-301-614-6532

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20191008/93c32be5/attachment-0001.html>


More information about the gradsusr mailing list