Plot from Julia embedded in C/C++ app



Hi all,

is it possible to plot from an embedded Julia from a C/C++ application? I am trying the following example, but no plot window appears. Also tried with gr() and plotlyjs() backends, no success so far…

int main()
     jl_eval_string("using Plots; x=1:10; y=randn(10,2); plotly(); plot(x,y);");
     if (jl_exception_occurred())
            jl_printf(jl_stdout_stream(), "%s \n", jl_typeof_str(jl_exception_occurred()));
    int ret = 0;
    return ret;


you need a display(plot(x,y))


Thanks, that was the missing link! :smiley: