Hey Alex,
from the rrdtool documentation for PRINT 
http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html#PRINT  :

%#.#lf
prints numbers like 12345.6789, with optional field width and precision

I use in my template files :   PRINT:<!-- rrd_sensid -->:MAX:"%5.1lf C"
to get my temperatures to display as "25.1 C"

Hope this helps,
Bruce

-------------------------snip------------------------------

<RRD::GRAPH <!-- www_dir --><!-- base_dir --><!--  
rrdimg_path -->all_temperature.png
    --imgformat PNG
    --imginfo '<IMG SRC="x<!-- base_dir -->y<!-- rrdimg_path -->%s" 
WIDTH="%lu" HEIGHT="%lu">'
    --width 800 --height 400
    --title "All temperatures"
    --vertical-label "Degrees C"
        --start '<RRD::CV starttime>'
        --end '<RRD::CV endtime>'
        -W "Wild Slug"
<!-- $color=0 -->
<!-- sensor_loop_start -->
    DEF:<!-- rrd_sensid -->=<!-- rrdfile_path --><!-- rrdfile -->:<!--  
rrd_sensid -->:AVERAGE
    LINE1:<!-- rrd_sensid --><!-- $color --><!-- $color++ -->:"<!--  
location -->"
    PRINT:<!-- rrd_sensid -->:MAX:"%5.1lf C"
    PRINT:<!-- rrd_sensid -->:AVERAGE:"%5.1lf C"
    PRINT:<!-- rrd_sensid -->:MIN:"%5.1lf C"
    PRINT:<!-- rrd_sensid -->:LAST:"%5.1lf C"

<!-- sensor_loop_end -->

--------------------------------------snip---------------------------------------
-----Original Message----- 
From: Alex Shepherd
Sent: Monday, May 14, 2012 8:10 PM
To: Owfs-developers@lists.sourceforge.net
Subject: [Owfs-developers] Changing Number Format of Y-Axis on 
TemploggerdGraphs

Hi Guys,

With temploggerd, can I specify a Y-Axis display mask like XX.X anywhere so
I get temperature labels with 1 decimal place?

When temperatures are not changing much, the graph auto-ranges in and
compresses the range such that the displayed labels have several instances
of each oC value without a single digit after the decimal place. I end up
with Y-Axis labels like:
20,20,20,21,21,21,21,21,22,22,22,22,22,23,23,23,23,23,24,24,24,24,24 (ie 5
labels all saying 21, 22, 23, 24 instead of 21.0, 21.2, 21.4, 21.6, 21.8,
22.0...

Regards

Alex Shepherd




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers 


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to