December – Contour plot in Mathematica

A contour plot is a nice way to represent 2D data. Mathematica has great for constructing such plots, but you might want to tweak the fonts and graphics a bit. Sometimes fonts should be enlarged so that they are visible e.g. in a journal article where there is not too much space to use.

The following code returns a contour plot of the Riemann zeta function's absolute value in an area in the complex plane; $(-2,10) \times(-10i, 10i) \subset \mathbb{C}.$ Text fonts are enlarged from default. Only values under $\max = 2$ are plotted. Values above that are “clipped” away as white colour. By definition of the absolute value, values are always more than 0, otherwise values under 0 would get clipped away with black colour. Contours are drawn in intervals of $0.1$, as adjusted in the Range function.

max = 2;
ContourPlot[Abs[N[Zeta[x + y*I]]], {x, -2, 10}, {y, -10, 10}, 
 PlotLegends -> BarLegend[{"Rainbow", {0, max}}], 
 ColorFunction -> "Rainbow", ContourStyle -> Black, 
 Contours -> Function[{min, max}, Range[min, max, 0.1]], 
 PlotLabel -> 
  Style["Absolute value of the Riemann zeta function", 16, Bold], 
 BaseStyle -> {FontSize -> 15}, 
 FrameLabel -> {Style["Real axis" , 16, Bold], 
   Style["Imaginary axis", 16, Bold]}, PlotRange -> {0, max}, 
 ClippingStyle -> {Black, White}]

Image zeta

References: