It looks like it's a bug in the Imagick library - The image is actually available, but as the return value of the function.
$canvas = new Imagick();
$canvas->newImage(1, 256, "white", "jpg");
$gradient = new Imagick();
$gradient->newPseudoImage(1, 256, "gradient:white-black");
$canvas->compositeImage( $gradient, imagick::COMPOSITE_OVER, 0, 0 );
$canvas->rotateImage(new ImagickPixel(), 90);
$fxImage = $canvas->fxImage("floor(s*10+0.5)/10");
$fxImage->setImageFormat('jpg');
header( "Content-Type: image/jpg" );
echo $fxImage;
Produces an image with a stepped gradient.
I've opened an issue for this on the Imagick github page.