Fractal pattern formation at elastic-plastic transition in heterogeneous materials