Problem with Principal component (PCA) and Partial least squares (PLS) using R

I'm trying to reduce highly dimensional data with factor methods. I'm using Principal component analysis and Partial least squares.

From these methods I'm using the first component as a Common factor to summarize the data.

Is it possible that PCA and PLS produce wildly different first components with the same initial data? Or is the R code wrong?

Figure 1: The first Principal component

Figure 2: The first PLS component

These figures imply that first components have pretty different kind of trend. Is this normal that first components are so different between the PCA and PLS?

My code for the PLS and PCA were:

#PLS model_pls <- plsr(y ~ as.matrix(X), data = ddata) first_comp_pls<- scores(model_pls)[,1]

#PCA #excluding the y variable newddata <- ddata[2:19] model_pca <- prcomp(newddata, scale =TRUE) first_comp_pca <- model_pca\$x[,1]

Firstly: it can be that the results of PCA and PLS are different, since they have a different objective function. Especially if the covariance between $$X$$ and $$Y$$ is near zero, the PLS solution is not stable.
And thirdly: it is useful to include code where you define ddata, so that we can actually run the code.