|
From: Ethan M. <eam...@gm...> - 2016-07-27 18:59:30
|
Use the "set link" command (version 5 only)
gnuplot> set link y2 via (y-32)*5./9. inv (y*9./5.)+32
gnuplot> set ytics format "%.0f °F"
gnuplot> set y2tics format "%.0f °C"
gnuplot> set xrange [0:150]
gnuplot> plot x
Imperfect ascii plot using "set term dumb":
+-------+-------+-------+------+-------+-------+-------+--**
140 °F + *** +60 °C
| ***** |
| **** |
120 °F + **** +50 °C
| **** |
100 °F + **** +40 °C
| **** |
| *** +30 °C
80 °F + *** +
| *** +20 °C
60 °F + *** +
| **** |
| **** +10 °C
40 °F + **** +
| **** +0 °C
20 °F + **** +
| **** +-10 °C
| *** |
0 °F **------+-------+-------+------+-------+-------+-------+---+
0 20 40 60 80 100 120 140
On Wed, Jul 27, 2016 at 9:59 AM, Alan Corey <ala...@gm...> wrote:
> I can't find an example of where these are being set on the fly, and
> for outdoor temperatures this is necessary since the ranges won't be
> the same year-round. After years of wishing I had a way to do this,
> I've now got an Oregon Scientific temperature sensor outdoors with the
> data being received by radio with an rtlsdr dongle, decoded by rtl_433
> and formatted into something Gnuplot can plot by some C I wrote. See
>
> https://www.raspberrypi.org/forums/viewtopic.php?f=63&t=154451&p=1015069#p1015069
>
> The thermometer setup gives me data in Celsius which I can plot fine,
> but I'd like to add a Fahrenheit scale as Y2 at the right side. Best
> would be to have Y2 with its own tickmarks based on (Y1 * 1.8) + 32,
> but it would be acceptable to have the same tickmarks with different
> labels. I can see how I could manually generate all the tickmarks and
> labels within a program, but is there a way to do this in Gnuplot?
> I'm aiming at having all this run by a cron job and generate a daily
> plot.
>
> I think normally I'd want to set y2range based on what yrange gets set
> to automatically. Or read the Y values at the tickmarks and calculate
> new ones for Y2. I don't want to plot more data, I just want to
> calculate another set of tickmarks. And it needs to change every day.
>
>
> Alan Corey
> --
> Credit is the root of all evil. - AB1JX
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning
> reports.http://sdm.link/zohodev2dev
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via:
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
|