x_lim = - exp ( - 1.0 ) + eps;

x1 = linspace ( x_lim, 1.0, 101 );
y1 = lambertw ( 0, x1 );

x2 = linspace ( x_lim, -0.01, 101 );
y2 = lambertw ( -1, x2 );

plot ( x1, y1, x2, y2, 'LineWidth', 5 );
grid on
xlabel ( '<--- X --->', 'FontSize', 16 );
ylabel ( '<--- W(X) --->', 'FontSize', 16 );
title ( 'Lambert W, branch 1 blue, branch 2 green', 'FontSize', 24 );

filename = 'lambert_plot.png';
print ( '-dpng', filename );
fprintf ( 1, '\n' );
fprintf ( 1, '  Graphics file saved as "%s".\n', filename );

