Ploting contours

I am trying to draw contour lines based on calculations obtained by solving a nonlinear problem, when building contours with contour I can use contourf to get unfilled current lines, how can I do the same with plot used in fenics?
like
plt.contour(x,y,values,colors=‘k’,levels=level)
plt.colorbar(plt.contourf(x,y,values,levels=level))

It is unclear if you are using legacy FEniCS or FEniCSx.
Note that all plotting in legacy fenics is based on matplotlib, and can be found at: Bitbucket

I’m using legacy fenics. Thanks for answer, it works!
p.s. for those who may be looking for a solution in the future
plot(Func,mode=‘contour’,levels=level)
plot(Func,mode=‘contourf’,levels=level)