phetsims / blackbody-spectrum

"Blackbody Spectrum" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 3 forks source link

Reduce "Graph Values" readout to 4 sig figs on the vertical axis #114

Open DianaTavares opened 4 years ago

DianaTavares commented 4 years ago

Mike D suggested reducing the Graph Values" readout to 4 sig figs on the vertical axis (horizontal is good). I think it is a good suggestion.

ariel-phet commented 4 years ago

@chrisklus this change I would think should be quite straightforward, worth doing before the spectrum change #115

chrisklus commented 4 years ago

Ready for review. I only saw one usage of number's toPrecision() method, so I'm waiting to hear if we have a PhET-specific way of setting sig figs (though I didn't find much).

Also, I noticed that at 200 and 250 K, the x-axis outputs 5 sig figs, as well as 3 sig figs for values less than 1 (if I'm not mistaken). Should these be modified as well?

DianaTavares commented 4 years ago

I like that now the sim looks more symmetric with the four sig figs, except for small numbers. I understand that it still being 4 sig fig, but I feel it very tie (top picture is published sim version, bottom picture is @chrisklus version):

Screen Shot 2019-09-26 at 12 17 40 PM Screen Shot 2019-09-26 at 12 28 35 PM

I don't know if it's possible to have 4 sig fig, but once that is zero, dot some number, only have 3 decimals.

What do you think @ariel-phet ?

ariel-phet commented 4 years ago

@DianaTavares @chrisklus frankly the sig figs on this sim are all over the map, there is really no consistency, and I don't think it is worth the effort to try to get it consistent (x axis varies, y axis varies, intensity, sig figs in temperature...)

@chrisklus currently the sim looks like on the y-axis (on master) it is doing something like

Numbers above 100: ###.# Numbers between 10-100: ##.## Numbers 1-10: #.### Numbers 0.1 - 1: 0.#### Numbers below 0.01 -1: 0.0#### Numbers below 0.01 gives on 1 sig fig in scientific notation.

On the x-axis basically just giving numbers to 3 decimal places (no sig fig consistency)

Let's make one tweak for the y-axis Numbers below 0.01 -1: 0.0### So basically only 3 sig figs in this case, but aesthetically better