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

What to use for real-time log aggregation and querying?
Server logging - Apache HTTP server
Can I configure the QuickTest print log size limit beyond 1000 lines?
Log4Net : Debug vs Info?
Redis - Define maximum log file length
Looking for a windows bat script to compress and move log4j log files
How to log to application log and security log from the same application
Markers in Logback
Enterprise Library 5: Exceptions not being logged to Event log on Windows Azure
How can I suppress the stacktraces and html in Wicket development mode
SAS Proc Printto clears the log
Generating managable log files on a batch file job
Enterprise Library 4.1 logging timestamp how to display millisecond
Red5: logging for external library
A good way to format a list of variables and their values in a single line
Logging in Clojure

Categories

HOME
autohotkey
google-cloud-pubsub
netty
ide
compression
readdir
rmarkdown
yacc
ethereum
minimax
wowza
mbed
eclipse-orion
bookmarklet
google-calendar-api3
audio-streaming
ecmascript-2017
policy
sasl
android-cursorloader
adobe-captivate
r-factor
jql
offset
machine-code
intersection
sampling
android-geofence
border-layout
kofax
client-server
const
nsdateformatter
armadillo
pyexcel
quartz
azure-data-catalog
ear
audio-fingerprinting
openpgp.js
selection-sort
reloaddata
dynatable
codesniffer
cardview
vertex-shader
access-violation
settext
objectify
queuing
database-administration
paypal-subscriptions
salesforce-service-cloud
skbio
datamodel
encode
skscene
bioconductor
biginsights
musicbrainz
uinavigationitem
syncano
playn
web-standards
gmaps4jsf
cl.exe
xmla
apache-pivot
sync
powershell-v1.0
nest-initiative
step
angular-file-upload
banana-pi
sendy
connections
node-amqp
php-amqplib
google-voice
zend-db-table
kademlia
coinbase-php
antixsslibrary
report-viewer2010
clgeocoder
mcpd
cherokee
soapexception
jquery-click-event
cryptolicensing
mass-emails
for-xml
web-widget
httpbrowsercapabilities
jettison
tracd
scalable
paperless

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile