Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3393116
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:00:45+00:00 2026-05-18T04:00:45+00:00

Wow, this one is though! I’m trying to find in PHP the % of

  • 0

Wow, this one is though!

I’m trying to find in PHP the % of a value relative to the Y axis. If we refer to this graph : http://en.wikipedia.org/wiki/Semi-log_graph (2009 outbreak of influenza A), let’s say that I want to find what % is a value “256” on the chart.

Visually, it’s easy : it’s a bit more than a 1/3 or 33%. If we look at the 1024 value, it’s around 50% of the height of the Y axis. 131072 would be 100%.

So how do I calculate this with PHP?

Let’s take this graph and take X = day 0 and Y = 256. What is 256 as a % of Y ?

Thanks a lot to anyone can compute this baby 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T04:00:45+00:00Added an answer on May 18, 2026 at 4:00 am
    percent = 100 * ( log(y) - log(y1) ) / ( log(y2) - log(y1) )
    

    where

    y = value 
    y1 = smallest value in y-axis
    y2 = largest value in y-axis.
    

    when y1 = 1.0 then you can simplify the other answers given here (since log(1)=0 by definition)

    percent = 100 * log(y)/log(y2)
    

    Note that not all log charts have 1.0 as the lowest value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Wow, it's hard to find a simple explanation to this topic. A simple many-to-many
WOW! That's a weird title, but I'm happy you're looking, cause I couldn't find
Wow...I've never seen this before. Any way to get around it? foreach( double r
I send data from javascript to PHP like this: $.ajax({'url': 'my.php', 'type': 'POST', 'data':
This one made me think: class X; void foo(X* p) { delete p; }
Wow, I just got back a huge project in C# from outsourced developers and
I've been evaluating various smart pointer implementations (wow, there are a LOT out there)
I need to get the path to the native (rather than the WOW) program
My work just gave me a quad core computer, and WOW build times are
Greetings! I'm attempting to use MKMapView without any Apple code samples, though there are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.