[Chart] How do I create inverted plots or log plots?

Eric Schug schugschug at gmail.com
Mon Jun 24 00:37:15 BST 2013


I'm trying to create inverse plots and log plots, but I can't seem to 
figure out which defaults to override.

It seems like something like this should work for invers

axisInv       :: AxisData Double -> AxisData Double
axisInv ad     = ad {
     axis_viewport_ =  (\r x ->  negate $ (axis_viewport_ ad) (snd r, 
fst r) (id x))
     -- , axis_tropweiv_ = (axis_tropweiv_ ad)
     }
...

layout1_bottom_axis^:laxis_override ^= axisInv

but I can't figure out how which should be negated the value or the 
result and how the range
should be modified. I would expect I would need to do something similar 
to axis_tropweiv_.
The mapping just does not seem easily composable.
Looking at vmap and linMap do not help because I don't know how to 
obtain the extra parameters
for these.




More information about the Chart mailing list