I am facing a pretty random problem using JLink (Java) connected to a Mathematica 11.3 kernel and front-end.
Basically I want to get an image using the JLink Java method com.wolfram.jlink.KernelLink.evaluateToImage(command, 0, 0, 0, true)
This is the Mathematica command that I pass:
Rasterize[
Plot[Evaluate[plotVars /. Sols], {t,ti,tf},
LabelStyle ->
{FontFamily -> Arial,FontWeight -> Bold, FontSlant -> Plain, FontSize -> 14},
PlotLegends -> plotLegends,
Axes -> False,
Frame -> True,
PlotStyle ->
Table[
{Dashing[0.03 k1/Length[plotVars]], Thickness[0.006]},
{k1, 1, Length[plotVars]}],
FrameLabel -> {"t", "Concentration"},
PlotRange -> Full,
ImageSize -> 700],
RasterSize -> 2000,
ImageResolution->72]
Most of the time I get the following image:
Other times, I get the usual image with ticks and numbers, and I don't understand why. Same code was tested on Mathematica 9.0 and 10.0 and never had this issue before. Problems are only faced with version 11.3.
This is the same code executed on a Mathematica 11.3 Notebook, it is showed correctly:
With JLink sometimes I get this same image but I want to guarantee that I always get the image with ticks and numbers.
Maybe JLink/Front End needs some additional configuration?
Any help would be really appreciated!