ComplexRegions.jl Package to plot complex plot z = a +ib

Hi all,

I am trying to add this package: ComplexRegions.jl

then it comes:

I want to plot a simple complex equation like:

z = 3 -i

But I can’t even add the package, due to some restriction / problem with Colors package, I still don’t get what to do when @nilshg share the solution on this type of problem.

I don’t know the package or why it has those compat limitations. But if you just want to plot a single complex number you don’t need it: plot([z]; st=:scatter)

1 Like

Thanks @gustaphe

How about create an imaginary circle ? circle with imaginary y-axis?

The package is quite old, and requires older versions of some packages than you currently have installed.

You can just create a new empty project, and install this package with its older dependencies.

1 Like

(When I worked in a restaurant, we had different chopping boards and knife sets for different dishes. So if, for example, we were preparing Oranges in Cointreau, we set up a new workspace so that it didn’t smell of chopped garlic or parsley. Similarly, you don’t always want traces of one Julia project spilling over into another. )

7 Likes

I didn’t know you were working in a restaurant, or just creating an illustration.

I try to create an environment for Real Analysis that currently needs ComplexRegions.jl. But, turns out, the package is too old and can’t be made to work with other installed package.

Hey, this problem of mine can be used to improve Julia…

instead of trying to downgrade package, how to tinker Julia source code so I still can use ComplexRegions.jl without creating new environment?

Is there any book to unfold Julia, or learn to improve Julia Source Code ?

The issue here is not about “Julia Source Code”, simply about packages having incompatible version specifications in their respective Project.toml files. So you don’t need to tinker with Julia source code, but simply with the code for the package which set the boundaries in its Project.toml.

In this case it appears that both ComplexRegions and Implicit3DPlotting haven’t been updated in a while and restrict you to quite old versions of dependencies (with ComplexRegions restricting Colors to 0.9, and Implicit3DPlotting restricting *Makie to 0.3).

If you absolutely want to use these packages together you will therefore need to edit the Project.toml of either of them, or maybe even both (I haven’t tried to work out what the easiest way is, but it seems trying to bump the Color compat entry in ComplexRegions would be one possible solution).

To do that you need to dev the package, then change the compat bounds in Project.toml locally, see whether the package still works with the new version of its Colors dependency, and then fix any errors you might run into (which is expected, as Colors 0.11 is two breaking releases on from 0.9). If you’ve managed to make it all work you could then even open a PR on the ComplexRegions repo with your local changes to make them available to others.

1 Like

Thanks for the advice to edit Project.toml, I will try it.

plot(exp.(im*range(0, 2π; length=100)))
1 Like