GKS error in plotting using Plots packages

Hey all,
I am trying to plot a graph on Julia, and the plot is being done but I don’t see the axes, nor the title or legend, all I get is the following message:

GKS: Rectangle definition is invalid in routine SET_VIEWPORT

and the plot itself looks like this:

The plotting is of some complex function which I took only the real part.
Does anyone knows and can help ?
thanks for all the helpers!

That looks like a lot of points. I would try to take a smaller sample (lets say every 100th point)

The issue with the points is not the problem, I already tried to take a fewer points.

GKS: Rectangle definition is invalid in routine SET_VIEWPORT

That usually happens when handling huge values (close to Inf), or trying to plot invalid values (negative or zeros in logarithmic scales, …).

If you need help, you need to provide more information on the data plotted, or even better provide a MWE.

The arguments are valid, I already checked them based on the same error other people got.
I think I solved that by moving to the Plotly backend

That’s not what I’d call solving a problem (bug fixes could benefit to other users).
But good anyway that another backend suits your needs.

1 Like