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


Groups > comp.graphics.apps.gnuplot > #1455

Re: plotting data directly from an Internet link?

Newsgroups comp.graphics.apps.gnuplot
Date 2012-10-30 08:56 -0700
References <cf7a8cca-4187-432d-84f9-1c6df0bf7871@googlegroups.com> <k6nbur$pep$1@dont-email.me>
Message-ID <9ceb5771-afd5-4a4e-b90e-00f8f283626a@googlegroups.com> (permalink)
Subject Re: plotting data directly from an Internet link?
From TonyG <tgozdz@gmail.com>

Show all headers | View raw


On Monday, October 29, 2012 9:53:32 PM UTC-4, sfeam wrote:
> TonyG wrote:
> 
> 
> 
> > Is it possible to use an Internet link to some column-formatted data
> 
> > as the data source for the 'file' part of the 'plot' command?
> 
> > 
> 
> > A good example would be plotting selected columns from
> 
> > http://www.ndbc.noaa.gov/data/5day2/44013_5day.txt
> 
> > 
> 
> > BTW, since I use a WinXP OS, I doubt I could use the pop(x) method as
> 
> > described in the Help file, e.g.,
> 
> > 
> 
> > pop(x) = 103*exp(-x/10)
> 
> > plot "< awk '{print $1-1965, $2}' population.dat", pop(x)
> 
> 
> 
> 
> 
> You say "I doubt I could use....".
> 
> But have you actually tried it?

Now I have... ;-)

> 
> So long as the gnuplot executable supports pipes, you should
> 
> be OK.

Yes, I'm using gnuplot_pipes as my default executable.  (BTW, why are there two versions if gnuplot_pipes has more capabilities; is there something missing in it in comparison to std. gnuplot?)

> 
> 
> 
> At least under linux one answer is
> 
>   plot "< GET http://www.ndbc.noaa.gov/data/5day2/44013_5day.txt"
> 
> 
> 
> where GET is a widely-distributed perl script roughly equivalent
> 
> to wget.  If you prefer wget, then 
> 
>   plot "< wget -O - http://www.ndbc.noaa.gov/data/5day2/44013_5day.txt"

Thanks; wget works, and downloads and displays the data when used from the command line.  However, it bombs out when used inside gnuplot:

gnuplot> plot "< wget -O - http://www.ndbc.noaa.gov/data/5day2/44013_5day.txt" using ($13) w lp  
         warning: Skipping unreadable file "< wget -O - http://www.ndbc.noaa.gov/data/5day2/44013_5day.txt"
         No data in plot

The input file has a two-row header:

#YY  MM DD hh mm WDIR WSPD GST  WVHT   DPD   APD MWD   PRES  ATMP  WTMP  DEWP  VIS PTDY  TIDE
#yr  mo dy hr mn degT m/s  m/s     m   sec   sec degT   hPa  degC  degC  degC  nmi  hPa    ft
2012 10 30 14 50 120  6.0  8.0   3.1    11   7.2 104 1001.2  14.0  12.4  12.5   MM +2.8    MM
2012 10 30 13 50 130  8.0  9.0   3.3    10   7.6  95 1000.4  14.1  12.4  12.6   MM +2.6    MM

but in my experience gnuplot handles such cases easily...  I have tried various changes, but to no avail--I'm stuck.

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

plotting data directly from an Internet link? TonyG <tgozdz@gmail.com> - 2012-10-29 10:15 -0700
  Re: plotting data directly from an Internet link? James <jjpuzzles@wowway.com> - 2012-10-29 13:00 -0700
    Re: plotting data directly from an Internet link? TonyG <tgozdz@gmail.com> - 2012-10-29 15:19 -0700
  Re: plotting data directly from an Internet link? sfeam <sfeam@users.sourceforge.net> - 2012-10-29 18:53 -0700
    Re: plotting data directly from an Internet link? TonyG <tgozdz@gmail.com> - 2012-10-30 08:56 -0700
      Re: plotting data directly from an Internet link? sfeam <sfeam@users.sourceforge.net> - 2012-10-30 22:54 -0700
        Re: plotting data directly from an Internet link? TonyG <tgozdz@gmail.com> - 2012-10-31 06:44 -0700

csiph-web