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

In SSIS 2008 BIDS write execution log to file
how to execute pipe command in android?
Will Web Server Log WGet Requests?
Make HTMLUnit less verbose
Where do I find my non-.NET role's logs when using Remote Desktop?
How to easily log XML-RPC traffic?
EnterpriseLibrary
how do I log requests and responses for debugging in servicestack
Any Lua logging library to integrate with log4j?
How to see logs in blackberry device?
How are build logs transferred to TFS?
Monitor application.log in Play Framework
how to pass java variable value into sql statement entry in log4j.properties file
Regenerate nginx logs
date based log file without reusing across runs
Nginx log rotation is happening without any file in logrotation.d

Categories

HOME
reactjs
algolia
macros
marie
cors
ssh
wifi
android-ndk
azure-database-mysql
spss
bitbucket
mingw
kohana
restheart
theory
elastalert
virtualenv
accordion
summernote
git-branch
opengraph
jira-zephyr
gulp-jshint
mex
csproj
kundera
jbossfuse
ios-autolayout
ilog
zimbra
powerbi-embedded
device-driver
client-server
jslider
idea-plugin
azure-web-roles
mixed-models
susy
ocpjp
flask-socketio
vertex
wink
sharpssh
fckeditor
seyren
db2-zos
queuing
aws-kms
user-profile
camellia
std
apache2-module
instabug
producer-consumer
transparentproxy
teamwork
asp.net-2.0
touch-typing
optimistic-locking
dojox.grid
yosemite
system.net
dirname
ccmenuitem
angular-file-upload
yandex-api
class-library
infor-eam
flask-mongoengine
xtify
scidb
outlook-object-model
mysql2
cloudmade
linqdatasource
waveout
optimistic-concurrency
mcpd
fxcopcmd
large-data-volumes
pkcs#7
datadude

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App