1 (edited by russell.ellwood 2015-10-15 20:42:29)

Topic: Displaying numbers as fractions?

Ivan,

I was wondering if it was possible to display a value in a label as a reduced fraction.  For example, if you look at my attached grf file (used for a simple animation), I want to display 0.0625 as 1/16 so that I won't need to have that "Note" table at the bottom.

I have struggled with several ideas (including superimposed labels with clear backgrounds), but I can't seem to find a way to animate this so that, for y >= 0, I have the simple integer values of x, but for y < 0, I display the x-values as fractions.

I even tried to use an "if" statement in a custom function, but I can't find a way to display a "blank" when I don't want the label to be displayed.

Is what I'm seeking possible?

Thank you, Russell

Post's attachments

Attachment icon animation - logarithmic.grf 29.08 kb, 149 downloads since 2015-10-15 

Re: Displaying numbers as fractions?

Unfortunately what you ask for is not currently possible. Graph does not currently handle fractions. And it will always give you a resulting value. But it sounds like a good idea, so I will put it on my todo list.

Re: Displaying numbers as fractions?

Hi, Ivan,

I sent you another post, but it disappeared and never got posted!  Not sure what happened, so I'm trying again.

I got around the problem (of Graph not displaying numbers as fractions) by simply creating a pair of labels for each of the 9 points.  I spaced them apart horizontally by 20 units (so only one point at a time would be showcased in the yellow box).  Each time the counter incremented, the old point's labels moved to the right and the next one's came in (from the left) to take its place.  I am attaching the grf file -- if you're interested.  To animate, I just let "k" go from -4 to 4 in step increments of 1, at 0.5 frames/second -- so it changes points every 2 seconds.

Russell

Post's attachments

Attachment icon animation - logarithmic.grf 220.98 kb, 162 downloads since 2015-10-20