linear and rbf fix for variational gradients in Z
plot merge