Sign in to follow this  
onez5827

Logarithmic Chart

Recommended Posts

I'm tring plot some coordinates on a logarithmic scale on a chart. A move from 10 to 20 should have the same magnitude as a move from 60 to 120 on the grids and legend. I assumed this involves the log function? Any help is appreciated

Share this post


Link to post
Share on other sites
That doesn't necessarily involve a log function. 60=6*10 and 120=6*20 so that could be linear. Basically with your chart the left side is one value of the data and the right side is some other value. Your chart starts at some position and ends at some other position. Say your data goes from sd to ed and your chart goes from ss to es. So given data value x it's screen position is ss+(x-sd)/(ed-sd)*(es-ss). You do that in both the x and y directions. Log scales are just the same except you convert the data first. So ss+(log(x)-log(sd))/(log(ed)-log(sd))*(es-ss). You are just plotting the log of the data instead of the data.

Share this post


Link to post
Share on other sites
Quote:
Original post by LilBudyWizer
That doesn't necessarily involve a log function. 60=6*10 and 120=6*20 so that could be linear.

I challenge you to draw me a linear curve that fits his description :)

Quote:
You are just plotting the log of the data instead of the data.

Yep, what he said. More specifically, you're plotting the log of the data on a linear scale.

Share this post


Link to post
Share on other sites
Thank you for the formulas, they made it easier to plot the points. Now that I can plot points on semi log scale on the y-axis, how should I make a formula to construct the y-axis legend values, allowing some space ahead of the min and max values?

I am starting to work with coordinates for charts alot. What kind of math should I learn that would help me better understand relationships between World and device coordinates, besides log? Any suggestions at all appreciated.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this