himoto / hillfit

Fitting the Hill Equation to Experimental Data
MIT License
11 stars 4 forks source link

Plotting logarithmic axes #11

Closed himoto closed 2 years ago

himoto commented 2 years ago

Hello @freiburgermsu,

Thanks to your great updates, now we can easily visualize fitting results. In some cases, I would like to get a resulting plot with setting x-axis to log10 scale, not linear scale. Do you think it's possible to allow users to modify axes scales, e.g., linear or log, in fitting() function?

Thank you, Hiroaki

freiburgermsu commented 2 years ago

Hello @himoto !

My open PR contains simple logic for adding log10 to a figure. The assumption of the current conversion is that the data asymptotically approaches 1, which is true for the sample data. Is this assumption generally true for Hill-equation data? The log10 option can nevertheless be useful for users to use at their discretion.

himoto commented 2 years ago

Hello @freiburgermsu, thanks for the updates.

If I understand right, your updates are for converting y-axis scale from linear to log. What I expect was to change x-axis scale (below link is an example), so we do not need to introduce any assumption. https://commons.wikimedia.org/wiki/File:Hill_equation_saturation.jpg Can you please change new argument from log_y to log_x? If you cannot, I will work on this.

Thank you.

freiburgermsu commented 2 years ago

Hello @himoto !

The recent push can convert the x-axis to a logarithmic scale with a simple log_x argument.

Thank you :) Andrew

himoto commented 2 years ago

Hi @freiburgermsu, Thank you for the great updates and examples! I will soon merge it.