logging


ggplot log scale y axis straight lines


I am having troubles with a simple ggplot that I need to incorporate a log scale y axis in. I understand that ggplot is right with curving lines once my axis has the log scale, but I need the lines to still connect my data points linearly.
This is my code:
forexample<-transform(example, EXP=factor(EXP, levels=unique(EXP)))
plot<-ggplot(forexample, aes(x=EXP, y=concentration, shape=sample))
+ stat_summary(aes(group = sample), fun.y = mean, geom = 'line', alpha=1, size=0.5)
+ stat_summary(aes(group = sample), fun.y = mean, geom = 'point', alpha=1, size=4) +
theme_bw() +
coord_trans(y = "log10")
my data is structured like this:
sample concentration EXP
H 0.08 Ex1
H 0.07 Ex2
M 2.00 Ex1
M 0.50 Ex2
R 0.01 Ex1
...
I tried Zoltáns suggestion in the question "ggplot2 log scale of y axis causing curved lines" but it didnt work out for me.
(ggplot2 log scale of y axis causing curved lines)
I would be really really glad if somebody could help me with this!
Thank you :)
This is the intended behavior of coord_trans, and is distinct from scale_y_log10. See also: http://stackoverflow.com/a/25257463/3330437
require(dplyr) # for data construction
require(scales) # for modifying the y-axis
data_frame(x = rep(letters, 3),
y = rexp(26*3),
sample = rep(c("H", "M", "R"), each = 26)) %>%
ggplot(aes(x, y, shape = sample)) + theme_bw() +
geom_point() + geom_path(aes(group = sample)) +
scale_y_log10()
If you want the y-axis labels and gridlines to look more like the coord_trans defaults, use scale_y_log10(breaks = scales::pretty_breaks()).

Related Links

How to output blackberry webworks console.log() to a file?
Creating directory for NLog log file on Azure
SLF4J implementation over Log4j
ServiceStack two Log Implementations console and file / eventlog
Additivity in java.util.logging
How to view history of queries (all OR over a long period) performed on database which is hosted on Azure?
Resque log handling: what sort of strategy?
Timestamps in upstart logs
Create Hive table to load logs in S3 subfolders
Is there any way to annotate solr logs?
Logging MQ Messages
Filter Log Files and Select show only unique Values [closed]
Java : Logging on demand on production
Weblogic log customization
Elasticsearch log explanation
Logging post data in TurboGears / Pylons

Categories

HOME
actionscript-3
internet-explorer
grizzly
ide
intellij-idea
locale
cluster-analysis
phantomjs
c++builder
livecharts
bitbucket
markdown
yacc
software-collections
token
ejb-3.0
activejdbc
expo
derby
web-testing
samba
vivado-hls
jquery-easyui
views
udeploy
include-path
ng-tags-input
scalatest
continuous-fourier
windows-mobile
visual-studio-community
restangular
apm
selenium3
storefront
mkdir
strategy-pattern
const
vertical-alignment
aura-framework
amazon-rds-aurora
piranha-cms
synchronized
yank
react.rb
vertex
consolidation
settext
csc
django-taggit
innertext
salesforce-service-cloud
ideavim
askbot
google-app-engine-php
cascading
github-for-mac
notice
syncano
fileinputstream
conditional-comments
formbuilder
system.net
cocos2d-x-2.x
pytz
drawable
twitter-finagle
cs193p
cvi
infor-eam
kernel-density
php-amqplib
randomaccessfile
typography
source-depot
panelgrid
report-viewer2010
certificate-revocation
nude.js
capitalization
rjs
xpolog
qvariant
youtube.net-api
sessiontracking
service-layer
meego-harmattan
norton
rollover
lgpl
database-agnostic
webdb
data-formats
html-help-workshop
high-load
moores-law
hotfix
memory-consumption

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile