Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3727
| Newsgroups | comp.graphics.apps.gnuplot |
|---|---|
| Date | 2017-08-22 14:09 -0700 |
| References | (2 earlier) <ondia2$rdd$1@solani.org> <a39fec6b-6c96-4b36-8b73-100ac971d4a7@googlegroups.com> <ong362$e46$1@solani.org> <09265b97-7ca8-4f2d-baa2-7e9ff9abf37e@googlegroups.com> <onhoga$ei4$1@solani.org> |
| Message-ID | <52aa35d4-af28-4f6b-9d00-c780124c533f@googlegroups.com> (permalink) |
| Subject | Re: Ephemerides data |
| From | robertvanpass@gmail.com |
On Tuesday, August 22, 2017 at 7:09:32 PM UTC+2, Karl Ratzsch wrote:
> Am 22.08.2017 um 16:57 schrieb robertvanpass@gmail.com:
> >>
> >>> However I still have an issue:
> >>>
> >>> When I add the code for the timezone specifier ( +strcol(3)[4:8]*3600) )
> >>> I get the errormessage "Non-numeric string found where a numeric expression was expected"
> >>>
> >>
> >> gnuplot automatically converts strings to numberic variables in
> >> expressions (i.e. if you do math like *1.0) if possible.
> >>
> >> Can you make an example like the one above that I can directly copy
> >> into gnuplot to reproduce your problem?
> >
> > No problem:
> >
> > 1. Putting these lines in a CSV file will give the errormessage:
> >
>
> I meant *exactly* ;-) like this:
>
> ---- gnuplot input ----
> $dat << EOD
> 8/20/2017;12:00:00 UTC+1.0;10h 35m 50.60s;+03° 47' 15.38";
> 8/21/2017;12:00:00 UTC+1.0;10h 33m 13.63s;+04° 02' 23.70";
> 8/22/2017;12:00:00 UTC+1.0;10h 30m 23.99s;-04° 20' 34.64";
> EOD
>
> set dataf sep "; "
> set table
>
> plot $dat us \
> (timecolumn(1,"%d/%m/%Y")):\
> (timecolumn(2,"%H:%M:%S")+strcol(3)[4:8]*3600):\
> (timecolumn(4,"%Hh %Mm %Ss")/3600):\
> (($7 + ($7<0?-$8:$8)/60 + ($7<0?-$9:$9)/3600)) w table
> ---- end ----
>
> , only with the plot command that fails for you.
>
> Then I can just c&p the whole thing into the gnuplot console, without
> creating files and guessing at your exact plot setup.
>
> The negative declinations come out wrong because the minutes and seconds
> get the wrong sign then. I fixed the above plot command to take that
> into account.
>
> K
Got it !
I use a slightly different plot command to correct for declination values between -00° and -01°, but basically it's like you say.
Now the last hurdle for me is that the X-axis of the graph is not in a readable Date-Time format:
$dat << EOD
8/20/2017;12:00:00 UTC+1.0;10h 35m 50.60s;+03° 47' 15.38";
8/21/2017;12:00:00 UTC+1.0;10h 33m 13.63s;+04° 02' 23.70";
8/22/2017;12:00:00 UTC+1.0;10h 30m 23.99s;-04° 20' 34.64";
EOD
set dataf sep "; "
set table 'ephem'
set term qt 1
plot $dat us \
(timecolumn(1,"%d/%m/%Y")):\
(timecolumn(2,"%H:%M:%S")+strcol(3)[4:8]*3600):\
(timecolumn(4,"%Hh %Mm %Ss")/3600):\
(($7 + ($7<0?-$8:$8)/60 + ($7<0?-$9:$9)/3600)) w table
unset table
plot 'ephem' u 2:4 w lp, \
'' u 2:5 w lp
Do you have an idea how to get date and time on the X-axis of the graph ?
Thank you very much !
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
Ephemerides data robertvanpass@gmail.com - 2017-08-20 06:36 -0700
Re: Ephemerides data Karl Ratzsch <mail.kfr@gmx.net> - 2017-08-20 22:56 -0300
Re: Ephemerides data Karl Ratzsch <mail.kfr@gmx.net> - 2017-08-20 23:59 -0300
Re: Ephemerides data robertvanpass@gmail.com - 2017-08-21 15:01 -0700
Re: Ephemerides data Karl Ratzsch <mail.kfr@gmx.net> - 2017-08-22 03:59 +0200
Re: Ephemerides data robertvanpass@gmail.com - 2017-08-22 07:57 -0700
Re: Ephemerides data Karl Ratzsch <mail.kfr@gmx.net> - 2017-08-22 19:09 +0200
Re: Ephemerides data robertvanpass@gmail.com - 2017-08-22 14:09 -0700
Re: Ephemerides data Karl Ratzsch <mail.kfr@gmx.net> - 2017-08-23 01:45 +0200
Re: Ephemerides data robertvanpass@gmail.com - 2017-08-23 13:09 -0700
csiph-web