Hi team Julia Community,
I shall be glad for your help with the above-stated issue. I am trying to use both the 'Gadfly' and 'PyPlot' plotting functionality in Julia, but I keep getting the above-mentioned error. I have done all I can at this point including following the instructions at - Plot not defined with Julia -, but no avail. I am using Julia version v"0.6.3" on Windows 10.
Kindly see the attached screenshots for your perusal.
Thanks in advance for your help with this issue.
Related
I am trying to use the ebirdst package for some exploratory data analysis, following this tutorial. Everything going according to plan until I run this line:
week_ext <- calc_full_extent(occ_proj)
and get this error:
Error in calc_full_extent(occ_proj) : could not find function "calc_full_extent"
I know sometimes new functions won't show up, or it can be a version issue, but the tutorial I'm referencing is from 2018 and everything else works perfectly. Does anyone know why a crucial function would just not be there? Or what steps to take? I've looked to see if there are any analogous functions and can't find any.
Also this is my first stackoverflow question--I've always been able to solve my issues based on existing questions, but there seems to be very little out there on ebirdst--so please let me know if I need to provide more info/context.
Thanks!
PyPardisoError: The Pardiso solver failed with error code -3. See Pardiso documentation for details.
I was working on Jupyter Notebook and I found this error. What does it mean and how can I fix this problem?
Error -3 is a matrix reordering problem. Reordering (moving around rows or columns to make the math easier) should not normally cause issues; please make sure you have a square, non-singular matrix.
If you can't figure it out, you can post the specific system you are working on to the Brightway mailing list or give a link here.
EDIT: The problem was instead a compatibility problem with intel-openmp and mkl. The solution given in the Github issue is to force an older version of intel-openmp:
conda install -c conda-forge intel-openmp=2021.4
I'm trying to write some command line Julia programs to generate and save plots.
This works:
#!/usr/bin/env julia
using Plots
pyplot()
plot(1:100,1:100)
savefig("foo.png")
But this doesn't:
#!/usr/bin/env julia
using Plots
function main(args)
pyplot()
plot(1:100,1:100)
savefig("foo.png")
end
main(ARGS)
Failing with
ERROR: LoadError: MethodError: no method matching getindex(::PyPlot.Figure, ::Symbol)
The applicable method may be too new: running in world age 21855, while current world is 21864.
Any thoughts or pointers appreciated please!
UPDATE - Thanks for all the suggestions. This is a work around:
#!/usr/bin/env julia
using Plots
function main(args)
plot(1:100,1:100)
savefig("foo.png")
end
pyplot()
main(ARGS)
UPDATE: To my knowledge, this issue should not be present in Julia v1.0
ORIGINAL ANSWER: This is probably more suited to a comment, but I ran out of characters.
This is the infamous "world age" issue in Plots. This usually shows up when you're using the GR backend, rather than PyPlot, but to my knowledge it can affect the entire Plots eco-system under certain circumstances.
Issue pages for this already exist here, here, and here (and I think there is actually one or two more). There are several people actively working on fixing this, but it's proving to be very tricky to eradicate completely.
As a work-around for now, try calling savefig on any random plot generated outside a function, then call the function(s) that contains the plotting that you want to do. This works on my system, hopefully it will work for you too.
I am getting quite desperate with this, having searched the internet for several days no one seems to have ever tried to draw a graph using xamarin.mac, which i find very hard to believe ! I cannot install core plot, oxy plot etc, because of a bug with the installer, trying to install either gives:
"Could not install package 'xamstore-coreplot 1.4.0'. You are trying to install this package into a project that targets 'Xamarin.Mac,Version=v2.0', but the package does not contain any assembly references or content files that are compatible with that framework."
or equivalent.
Can someone please either help me fix the above error, or help me draw a graph in xamarin.mac using core graphics or something ? I really only want to plot a line graph from a set of points, i didn't think it would be that hard !
Thanks in advance !
That error is stating the fact that there is no mobile (Xamarin.Mac, Version=v2.0) build of the library. If there is a "desktop", but you might be able to swap the target framework of your project.
I compiled Julia 0.1 from the source code on my Ubuntu 12.04. It is my first time try with Julia actually.
The compilation got through to the end with no problem but some warnings.
When I try to execute the plot command , here comes the problem,
julia> plot(x->sin(x^2)/x, -2pi,2pi)
ERROR: plot not defined
Did the compilation go wrong somewhere or Do I have to install extra package to plot in Julia?
Thanks
The web-based graphics are outdated and unmaintained (though there's work in progress to get the next generation of web graphics working). Plotting alternatives include the Winston or Gadfly packages at https://github.com/nolta/Winston.jl and https://github.com/dcjones/Gadfly.jl which you can install simply using the Pkg.add("Winston") (or Pkg.add("Gadfly") commands). For documentation and usage examples please refer to the linked repositories.
For MATLAB-style plotting under Julia, type once
Pkg.add("PyPlot")
to install the PyPlot package, which gives you access to Python's matplotlib library. Then try e.g.
using PyPlot
x = -2pi:0.1:2pi;
plot(x, sin(x.^2)./x);
OK I found the solution myself,
Julia uses a web REPL to provide some basic graphics capabilities. Just have to follow the steps here:
https://github.com/JuliaLang/julia#web-repl
Julian Schrittwieser also has a library based on MathGL:
http://www.furidamu.org/blog/2012/02/26/plotting-with-julia/
I am not sure whether it is still under maintenance by the author.
As of right now (a few years passed since the question was asked so the ecosystem has matured), the package I would suggest for easy quick plots would be Gadfly, with some use of PyPlot for publication quality graphs that require a lot of control.
To install, just type
Pkg.add("Gadfly")
in a Julia command line, and to use, type:
using Gadfly
plot([sin, cos], 0, 25)
PyPlot is still the preferred plotting option for when you want a lot of control over your graphs, but it is a wrapper for a Python library and is slightly less user-friendly. It also requires a working python install on your system.