Questions tagged [julia-plots]

95 questions
3
votes
1 answer

How to save two overlapped plots together in one single file?

using Plots plot(0:10,sin); plot!(0:10,sin,seriestype = :scatter) In this example, the output are actually two plots. How can I save them in one file? I searched and tried some method, but they only support one single plot and I haven't found any…
swish47
  • 31
  • 3
3
votes
1 answer

How to stop grid from auto scaling with Julia plots

I'm making a gif using Julia Plots, however, as the frames progress the grid autoscales making it seem very jittery, if anyone knows if I can simply set the exact size of the grid such that it remains stagnant that would be a great help. …
3
votes
1 answer

How to make an animation using PyPlot.jl with multiple axes?

I would like to create an animation of two axes. In the simple example illustrated below, I would like to plot two matrices using imshow as a function of time. Coming from python, I would create an animation using matplotlib.animation similar to…
3
votes
0 answers

Julia Plots-GR, export to PDF, retain text editability

I am trying to save some figures I made in Julia (Plots package, GR backend) to PDFs and I love the aesthetics + being able to save as vector graphics. However, I may need to invariably tweak things in Illustrator. When in Matlab, the plots exported…
ITA
  • 3,200
  • 3
  • 18
  • 32
3
votes
1 answer

Is there a way to plot a layout in Julia, using different colours per plot?

I am trying to plot a layout in Julia env using the code below x = 1:100 y = sin.(rand((Normal()), 100,4)) # plot plot(x,y) # layout plot(x,y, layout = (4,1), color = [:red,:blue]) What I expected was a coloring of each plot with either red or…
ouroukai
  • 33
  • 3
3
votes
1 answer

Arrays have incorrect length or dimension. Contour plot in Julia

I am trying to make a simple contour plot. using Plots xi = -10:10 zi = 0:-1:-10 X = xi'.*ones(size(zi)) Z = zi .*ones(size(xi))' plot(contour(X, Z, X, fill = true)) Which returns Arrays have incorrect length or dimension. and an empty…
iury simoes-sousa
  • 1,440
  • 3
  • 20
  • 37
3
votes
1 answer

Failed to precompile StatsPlots.jl

This might be connected to this or this. However, none of the suggested solutions works for me. I'm using VSCode with the Julia extension and I run everything in a Jupyter notebook. My first cell looks as follows. using Distributions using…
David Scholz
  • 8,421
  • 12
  • 19
  • 34
3
votes
1 answer

Multiple plots on the same figure julia

I am writing a Julia program which iteratively runs another function, and will give me two sets of results. I want to plot these results and right now what I am doing is to plot the results of each for loop separately which gives me about 20 plots…
newtothis
  • 495
  • 3
  • 10
3
votes
1 answer

Plot line between 2 points in Julia

Suppose we have drawn 10 points and we want to draw a simple line between each one of them. begin x,y = rand(1:10, 10), rand(1:10, 10) scatter(x,y) #Some drawing line code end How can we do this in Julia using Plots.jl package?, I'd…
3
votes
3 answers

Compute and plot central credible and highest posterior density intervals for distributions in Distributions.jl

I would like to (i) compute and (ii) plot the central credible interval and the highest posterior density intervals for a distribution in the Distributions.jl library. Ideally, one can write their own function to compute CI and HPD and then use…
Pietro
  • 415
  • 6
  • 16
3
votes
1 answer

Julia: ImplictPlots in a loop: setting colors

How can I assign colors with implicit_plot? using ImplicitPlots, Plots v = [(x,y) -> (x+3)*(y^3-7)+18, (x,y) -> sin(y*exp(x)-1)] p = plot() for f in v implicit_plot!(f; xlims = (-1, 3), ylims = (-1, 2), framestyle = :origin, lc = [:red,…
PatrickT
  • 10,037
  • 9
  • 76
  • 111
3
votes
0 answers

Why can't I properly install Plots package on Julia?

I'm new to Julia programming and am trying to install the Plots package; this should be rather simple but it has not been so. Every time I try to do it I get the following error message: ERROR: Pkg.TOML.ParserError(2, 2, "expected a key but found an…
3
votes
1 answer

Plotting values on a regular 2D grid in Julia

There is a certain parameter values set over a regular 2D lattice. I want to display them in the form of cells of a regular grid, filled in with a color depending of the value of the parameter. There may be gaps in individual grid nodes. Here is an…
Anton Degterev
  • 591
  • 2
  • 12
3
votes
1 answer

Draw a function given by a system of equations involving an implicit function

I need to draw a graph of a function like this: What is the most elegant way to do it?
Anton Degterev
  • 591
  • 2
  • 12
3
votes
1 answer

Plotting a 3D surface in Julia, using either Plots or PyPlot

I would like to plot a two variable function(s) (e_pos and e_neg in the code). Here, t and a are constants which I have given the value of 1. My code to plot this function is the following: t = 1 a = 1 kx = ky = range(3.14/a, step=0.1, 3.14/a) #…
Madlad
  • 125
  • 12