# Logarithmic Chart

This topic is 5182 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 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 on other sites
Quote:
 Original post by LilBudyWizerThat 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 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.

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 10
• 11
• 13
• 9
• 11
• ### Forum Statistics

• Total Topics
634092
• Total Posts
3015437
×