- Posts: 35
- Thank you received: 0
Changing the number of significant digits on bar graph- possible?
- nigel-tufnel
- Topic Author
- Offline
- Junior Member
-
Less
More
9 years 8 months ago #87432
by nigel-tufnel
Question- how do you decrease the number of significant digits on the add on pyvcp spindle speed bar graph in Axis? I want to just display the RPM to one RPM resolution (i.e. XXXX rpm; not XXXX.X rpm). Adding <format>"4.0f"</format> to the <bar> section didn't change anything.
Thanks.
Thanks.
Please Log in to join the conversation.
- tommylight
-
- Online
- Administrator
-
Less
More
- Posts: 22009
- Thank you received: 3
9 years 8 months ago #87433
by tommylight
Replied by tommylight on topic Changing the number of significant digits on bar graph- possible?
www.anderswallin.net/tag/pyvcp/
Have a look here.
Have a look here.
Please Log in to join the conversation.
- nigel-tufnel
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 35
- Thank you received: 0
9 years 8 months ago #87629
by nigel-tufnel
Replied by nigel-tufnel on topic Changing the number of significant digits on bar graph- possible?
Thanks for the link. Could not find any help there.
Anyone else have ideas?
Thanks
Anyone else have ideas?
Thanks
Please Log in to join the conversation.
9 years 8 months ago #87631
by cmorley
Replied by cmorley on topic Changing the number of significant digits on bar graph- possible?
from source:
so it is hard coded to 3.1f
you could edit the file pyvcp_widgets.py locally to change it.
Chris M
Code:
# update value
newvalue=pycomp[self.halpin]
if newvalue != self.value:
self.value = newvalue
valtext = str( "%(b)3.1f" % {'b':self.value} )
self.itemconfig(self.val_text,text=valtext)
# set bar colour
so it is hard coded to 3.1f
you could edit the file pyvcp_widgets.py locally to change it.
Chris M
Please Log in to join the conversation.
- nigel-tufnel
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 35
- Thank you received: 0
9 years 8 months ago #87791
by nigel-tufnel
Replied by nigel-tufnel on topic Changing the number of significant digits on bar graph- possible?
Thanks! That did the trick!
Please Log in to join the conversation.
Time to create page: 0.262 seconds
