I have a set of data with both negative and positive values. I would like to present them on a plot with y axis in logarithmic scale. As some of the values are negative, log="y" doesn't work. How to overcome this?
            Asked
            
        
        
            Active
            
        
            Viewed 2,159 times
        
    0
            
            
        - 
                    This is not so much a programming question as a math question. You will probably get more of a response on [Cross Validated](https://stats.stackexchange.com/) – G5W Jun 24 '18 at 12:28
- 
                    1Alternatively, provide a subset of your data, show us the code you are using that doesn't work and the error it is providing, and with a reproducible example there is better chance that someone will be able to help you. Thanks :) – mysteRious Jun 24 '18 at 15:02
- 
                    You can try an `asinh` transform of your data. Not sure if I recommend it though... Also see https://www.r-bloggers.com/modeling-trick-the-signed-pseudo-logarithm/amp/ – mikeck Jun 24 '18 at 15:56
1 Answers
0
            Thank you all for your comments. I've solved the problem by myself: instead of using simple plot() for generating the graph, I've used ggplot2 package with scale_y_log() function to present linear units at logarithmic scale (including negative values).
However, I have one more - similar - question, which can be found here.
 
    
    
        barbrka
        
- 153
- 1
- 11
