# The right ratio when graphing stuff

Discussion in 'Mac Programming' started by jsmwoolf, Aug 31, 2011.

1. ### jsmwoolf macrumors regular

Joined:
Aug 17, 2011
#1
If you were to graph stuff such as lines, circles, parabolas, functions, etc., what kind of ratio would be appropriate when using units? Do current graphing software use a ratio for converting pixels to units?

2. ### chown33 macrumors 604

Joined:
Aug 9, 2009
Location:
descending into the Maelström
#2
The scale depends on the function being graphed. I would expect different scales (and ranges) when graphing sin(x) vs. tan(x) vs. sin(x)+cos(10*x)

To see some graphs, launch Grapher.app, located in your Applications/Utilities folder. It's part of the standard OS install. Choose a 2D graph with default settings. Then enter each of the following functions, exactly as given:

y= sin x
y= x sin x
y= sin x + cos 10x
y= tan x

You can graph many other functions, many of which will be off the visible area of the graph unless you change the range and scale being plotted.

3. ### jsmwoolf thread starter macrumors regular

Joined:
Aug 17, 2011
#3
But, there's always a pixel to unit ratio when it comes to graphing. Would it be best to convert pixels to picas, point, inches, meters? The TI-84 Calculator always has a ratio on graphing units and it's always fixed regardless of what function you're using.

4. ### chown33 macrumors 604

Joined:
Aug 9, 2009
Location:
descending into the Maelström
#4
Please look at Grapher.app. The basic 2D graph is a pure Cartesian plane. You can zoom in or out, change the scale, change the origin, etc. The number of pixels per unit varies. By "unit" I simply mean a line segment of unity length, i.e. 1.0.

Grapher.app doesn't have units of measurement: e.g. inches, meters, furlongs, kilograms, etc. It only has numbers. And the number of pixels per unit-length varies depending on scale (zoom level). Zoom in and the distance between 0.0 and 1.0 gains more pixels. Zoom out far enough and the distance between 0.0 and 1.0 may be less than a pixel. Heck, the distance between 0 and 100 may be less than a pixel.

5. Aug 31, 2011
Last edited: Aug 31, 2011

### jsmwoolf thread starter macrumors regular

Joined:
Aug 17, 2011
#5
So, it's not a fixed ratio? It's only based on how zoomed in/out you are? Okay, I just could never exactly figure out how current graphing programs can give equal footing.