我正在尝试将scattter3D中的Y轴设置为Log2或Log10比例,但是我无法做到这一点。有什么办法可以像在excel中那样绘制Y轴的对数刻度,并保持原始值?
这是代码的摘录,以及我得到的图表。但是,我只能绘制线性比例。
代码: 使用此代码,我只能创建Y轴的线性比例。
library(plot3D)
library(car)
setwd("~/Documents/Second_paper/Stats/3D_figures")
my_table <- read.csv("M15_3D_halfmedia.csv", header=TRUE)
# Create Matrixes
Time <- my_table[,1]
Od <- my_table[,3]
pH <- my_table[,4];pH
Media <- my_table[,2]
class(Media)
Media
# Confidence interval
# CI <- list(z = matrix(nrow = length(Time),
# data = rep(0.05, 2*length(Time))))
#Insert confidence interval standard error
standard_errors <- my_table$SE_OD #enter the list of standard errors
width <- 2*standard_errors
width_mat <- rbind(width,width)
width_mat <- t(width_mat)
CI <- list(z = width_mat)
#Create color palette
cbPalette <- c("#003366", "#FF3399", "#56B4E9", "#FF3333", "#3300CC", "#009E73", "#F0E442")
#Create 3d plot
s3d<- scatter3D(Time, pH, Od, pch=16, type="h", nticks = 8,
bty="b2", theta = 45, phi = 25,
colvar = as.integer(Media),
col = cbPalette,
ticktype="detailed",
colkey = list(side = 1,
addlines = TRUE, length = 0.5, width = 0.5),
xlab="Time", ylab="pH", zlab="OD600", CI=CI)
图:这是线形比例尺的Y轴图的外观。但是,我想像在excel中一样将其转换为对数刻度。标签在Illustrator中进行了修改。
谢谢