= #JxnPortable\docs\plot_examples\demos\JxnUVGridDemo.jxn

uv = @JxnUVGrid( -2.5, 2.5, 0.25, -2.5, 2.5, 0.25, -5 )
x1 = uv.u()
y1 = uv.v()
r = clipLE( abs( x1, y1 ), 0. )
phi = 180. clipGE( atan2( y1, x1 ) / PI, 0.99999 )
plot( phi, r ).setXYLabels( "phi(x,y)", "r(x,y)" )
!
uv = @JxnUVGrid( 0., 2.5, 0.5, 0., 360., 30., -5 )
r = uv.u()
phi = uv.v()
x2 = r cosD phi
y2 = r sinD phi
plot( x1, y1, 1. ).add( x2, y2, B ).setXYLabels( "x(r,phi)", "y(r,phi)" )