Questions tagged [plots.jl]

Plotting interface and wrapper for several julia plotting packages

Useful links

205 questions
1
vote
1 answer

Inconsistent MethodError: only exists outside call to plots

This is code that works fine: function band_limited_interpolation() h=1 xmax=10 x = -xmax:h:xmax xx = -xmax-h/20:h/10:xmax+h/20 v = x .== 0 function p(v) p = zeros(size(xx)) for i in…
cj wyett
  • 152
  • 6
1
vote
1 answer

Change image resolution when exporting png with plotly.js backend

How can I change size of output png when plotting in Julia with plotlyjs backend? Here is my code: plotlyjs() a = [1,2,3]; b = [1,2,3]; p = scatter(a, b); plot!(p, size=(500, 500)) savefig(p, "test.png") Julia plot window is 500x500 but exported…
Toivo Säwén
  • 1,905
  • 2
  • 17
  • 33
1
vote
1 answer

Add tag with coordinates to plot in Plots.jl

I have a plot with intersecting lines: And I would like to add a tag or pointer which point to the intersection and display the coordinates of the intersection. Something like this: I know the coordinates of the intersection and I know that the…
Velitar
  • 21
  • 3
1
vote
1 answer

How to prevent StatsPlots.jl reordering categorical data

If I plot a boxplot using StatsPlots.jl with categorical data on the x axis, StatsPlots.jl orders the axis alphabetically. How can I stop this from happening? using DataFrames using StatsPlots plotly() df = DataFrame(grade=[rand(4:0.5:6, 40)..., …
Jonas
  • 1,401
  • 9
  • 25
1
vote
1 answer

Julia: How can I align x axises in grid plot with Plots.jl?

I want to align the x-axises from a heatmap and an areaplot with Plots.jl: But the thing is that the colorbar disaligns the axes. Any ideas to actually achieve this or any work around that could be useful? My main plot function looks like…
DisabledWhale
  • 771
  • 1
  • 7
  • 15
1
vote
1 answer

Plotting the same plot twice as subplots

I want to create a plot with a couple of subplots using Plots.jl. Here's an example: using Plots gr() p = plot(1:10, 1:10) q = plot(1:10, 10:-1:1) plot(p, q) That works exactly as expected! But say I want to use the same plot twice like…
Dan
  • 11,370
  • 4
  • 43
  • 68
1
vote
1 answer

Creating a subplot after adding plots using for loop

I have dataframe with an id column. I want to filter the dataframe for a specific id and then add data from columns to a plot (This part is done using a for loop). And finally, I want to add the plots (3 in this case) into a subplot. I have achieved…
imantha
  • 2,676
  • 4
  • 23
  • 46
1
vote
1 answer

showcols not defined in Julia

I was working with a CSV file and I want to check for missing values in each column in that file using showcols but Julia Repl throws an error. Should I use any package for that
uma_8331
  • 89
  • 5
1
vote
1 answer

Passing labels to Plots.jl histogram

I am new to Julia and was wondering how to pass labels to the Histogram function in Plots.jl package. using Plots gr() histogram( data[:sentiment_labels], title = "Hstogram of sentiment labels", xlabel = "Sentiment", ylabel =…
imantha
  • 2,676
  • 4
  • 23
  • 46
1
vote
1 answer

How do I convert ArrayFire Image to Julia Image?

I want to use the plotting functionality of Plots.jl with an image loaded using the load_image() function of ArrayFire. What I have is : AFArray: 1000×300×3 Array{Float32,3} What I want is : 300×1000 Array{RGB{Any},2} with eltype RGB I couldn't be…
atachsin
  • 173
  • 10
1
vote
1 answer

How to identify standalone spheres in Julia?

How is it possible to get rid of standalone spheres? Or how can I manipulate the data set, that I don't plot spheres, which are not connected together? (Means the surface of a sphere does't touch another sphere) In the example there are some spheres…
Tom
  • 100
  • 6
1
vote
0 answers

Plots.jl Precompile fails using Julia v1.5.1 under Windows 2012 R2

Just installed Julia v1.5.1 under Windows 2012 R2. Get similar error to what was reported here: I got a message "using Plots" in Julia and I do no how to resolve it If I follow the steps seen here for MacOS Catalina…
jort
  • 33
  • 1
  • 4
1
vote
0 answers

Plot a line with multiple markershapes

Trying to plot a line where each point has its own markershape, I tried: using Plots xs = [1, 2, 3] ys = [2, 3, 2.4] markers = [:x, :hexagon, :none] plot(xs, ys, markershape=markers) But that gives the following, which only has xs as markers: I…
miha priimek
  • 919
  • 6
  • 20
1
vote
0 answers

julia how to use Plots

When I try and use Plots, It errors. Please help me, how can I deal with it? I am using Julia v1.3.0 and did Pgk.add("Plots") to downloads so I don't know why I have this problem... Is the version of Julia or the Plots package wrong? (I am on…
王毅鹏
  • 11
  • 2
1
vote
1 answer

Can I assign specific values from a ColorGradient to a marker?

I apologize for this super basic question, but I am not experienced in plotting, and a lot of the documentation for Julia plotting assumes more knowledge than I have! I am creating a scatter plot, using Plots, where each marker is plotted based on…
Chair
  • 85
  • 1
  • 7