R: partial dependency plots from GBM package. Values and y-axis I'm using the gbm.step package in R to look at the influence of three continuous variables on my continuous response variable.  I have 234 observations.  The model:
poa.tc2.lr005.bg0.5 <- gbm.step(data=poa, 
                          gbm.x = 8:10, 
                          gbm.y = 7,    
                          tree.complexity = 2, 
                          family = "gaussian", 
                          #n.trees = 50,
                          #n.folds = 10,       
                          #step.size = 25, 
                          max.trees = 10000,    
                          prev.stratify = FALSE, 
                          learning.rate = 0.005, 
                          bag.fraction = 0.5)

After settling on some initial parameters of tc, lr and bag fraction, I would like to produce partial dependency plots for my predictor variables using gbm.plot:
gbm.plot(poa.tc2.lr005.bg0.5, n.plots=3,
         write.title = F, 
         show.contrib=T, 
         y.label="Marginal effect on gs")

The general trend of the dependencies makes sense given the data, however the y-axis scale is throwing me off.  
The y-axis range is between -0.04 to 0.06, however, my response variable range is between 0.02 and 0.38. With the new range, it's hard to accurately interpret the results.
My questions:


*

*Why doesn't the y-axis in the dependency plot reflect the range of my dependent variable? Are the values normalized to something?

*How do I extract the values used to construct these graphs? I would like to reconstruct the dependency plots in a different program. I have tried 
names(poa.tc2.lr005.bg0.5)
poa.fitted <- (poa.tc2.lr005.bg0.5$fitted)

but those values are not the same used in the dependency plots generated by the gbm.plot code above. Is there a different output for these values that I should be looking for?
 A: First of all, I think you're using the gbm.step function from the dismo package.
Even though your y ranges from 0.02 to 0.38, the model can still decide that certain variables (or certain ranges of a variable) have a negative contribution to y's value.  If this is the case, the marginal effects plot will include negative values.
Finally, use the plot.gbm function from the gbm package to get the values used for the marginal dependency plots:
library(gbm)
model <- gbm(Sepal.Width  ~ ., distribution = "gaussian", data=iris)
plot(model, 'Species', return.grid=TRUE)
     Species        y
1     setosa 3.067434
2 versicolor 3.052529
3  virginica 3.052915

I think this plot uses a slightly different approach than dismo::gbm.plot, but the results should be similar.
A: The accepted answer is correct. However, I wanted to elaborate on some of the comments to the answer.
dismo::gbm.plot essentially calls gbm:plot.gbm in it's source code. The grid returned from plot.gbm is the same grid gbm.plot uses to make it's plots.  dismo::gbm.plot just adds additional options to gbm:plot.gbm. If you want to recreate your own plots use gbm:plot.gbm with return.grid=TRUE to return a grid of 100 predictors and responses.
If you want to transform the responses like in dismo::gbm.plot or like in Elith et al. 2008 you can run functions on the grid.
#gbm.object= your gbm object
#j = variable number

k <- match(gbm.object$contributions$var[j],gbm.object$gbm.call$predictor.names)

response.matrix <- gbm::plot.gbm(gbm.object, k, return.grid = TRUE)
predictors[[j]] <- response.matrix[,1]   

#If factor variable
predictors[[j]] <- factor(predictors[[j]],levels = levels(gbm.object$gbm.call$dataframe[,gbm.object$gbm.call$gbm.x[k]]))

responses[[j]] <- response.matrix[,2] - mean(response.matrix[,2])

#Perform transformations
#Put it on a log scale
  responses[[j]]<-1/(1+exp(-responses[[j]]))

#Center the response to have zero mean over the data distribution
  responses[[j]]<-scale(responses[[j]], scale = FALSE)

#Add a smoothed line to an active plot
loess(responses[[j]] ~ predictors[[j]], span = 0.3)

A: A very simple way of getting the values used for plotting:
1. Type plot.gbm into your console.
2. Copy the function code to an empty script file.
3. On the first row type gbm.plot2 <- in front of function(..., this defines a new function gbm.plot2() that produces the same output as the original function.
4. Add print(X) before the very last }.
5. Call the new function temp = gbm.plot2(your.gbm.model, 1) and the data is saved as temp.
