plots icon indicating copy to clipboard operation
plots copied to clipboard

Log scale breaks with small fractions.

Open GregorySchwartz opened this issue 8 years ago • 1 comments

The scale seems to completely break the diagram with some fractions. Especially when trying to make a volcano plot, for instance, which has all values on the y-axis between 0 and 1 (p-values).

import Plots
import Diagrams.Prelude

import Data.Typeable

mydata1 = [(0.1,0.3), (0.6,0.5)]

myaxis :: Axis B V2 Double
myaxis = r2Axis &~ do
  scatterPlot' mydata1

  yAxis . logScale .= LogAxis

dia = renderAxis myaxis

GregorySchwartz avatar Aug 02 '17 15:08 GregorySchwartz

Thanks for the report.

Yeah, sorry about this. The log axis should be considered an alpha feature. I only really wrote what I have to convince myself I could get it to work with the current framework.

I've had a look and it's not obvious to me to how to fix this. I seem to think something funny was going on with the scaling since log values < 1 are negative. I'll try to have another look at this over the weekend but no promises this will get fixed any time soon.

cchalmers avatar Aug 02 '17 23:08 cchalmers