Plotting interface and wrapper for several julia plotting packages
Questions tagged [plots.jl]
205 questions
3
votes
3 answers
How to set the default color gradient in Plots.jl
In Julia's Plots package, I can change the color of a surface plot like this:
plot(mySurface,st=:surface,c=:blues)
How can I change the default color gradient so that I don't have to put the c=:blues every time?
(The relevant Plots doc page does…

Yly
- 2,150
- 4
- 20
- 33
3
votes
3 answers
Column name containing a space in Plots.jl
I am trying to plot a specific column of a data frame with a name containing a space in Julia Plots.jl (GR backend).
Here is my data frame structure:
17-element Array{Symbol,1}:
Symbol("DATE/TIME")
[...]
:TEMPERATURE …

user182917
- 1,688
- 2
- 14
- 17
3
votes
1 answer
Julia Plots.jl: changing marker colour from series recipe
I am trying to put together a Plots.jl user recipe, that would create several scatter plots and histograms arranged in a grid. The scatter plots should occupy the lower triangle of the grid. Histograms go on the diagonals. Each scatter plot should…

Evgeny Tanhilevich
- 1,119
- 1
- 8
- 17
3
votes
1 answer
How to label barcharts in Plots.jl?
I can do a simple barplot
using Plots
bar([1,2,3])
but how do I label the bars as "a", "b", "c"?

xiaodai
- 14,889
- 18
- 76
- 140
3
votes
1 answer
scale-range and scale-font for heatmaps and histograms using Julia Plots.jl
I'm creating heatmaps and histograms using Plots.jl. E.g.,
heatmap(labels_x, labels_y, my_data_matrix)
2 questions:
How does one change the font for the tick labels on the color scale?
How does one change the range of the values in the color…

user3320864
- 31
- 2
3
votes
1 answer
Animating the solution to an ODE in Julia
I have a julia code:
using DifferentialEquations
using Plots
using ParameterizedFunctions
plotly()
lorenz = @ode_def Lorenz begin
dx = σ*(y-x)
dy = ρ*x-y-x*z
dz = x*y-β*z
end σ = 10. β = 8./3. ρ => 28.
u0 = [1., 5., 10.]
tspan = (0., 2.)
prob…

93a
- 106
- 5
3
votes
2 answers
Multiple histograms in Julia using Plots.jl
I am working with a large number of observations and to really get to know it I want to do histograms using Plots.jl
My question is how I can do multiple histograms in one plot as this would be really handy. I have tried multiple things already, but…

DoubleBass
- 107
- 1
- 7
3
votes
1 answer
How plot on Images with Plots.jl?
I want using Plots.jl for plot on Images, for example simple sinusoid. Here my code:
using Plots
using Images
gr()
h = 400
w = 600
a = Array(RGB{FixedPointNumbers.UFixed{UInt8,8}}, h, w)
img = Image(a)
p=plot(img)
x =…
user4651282
3
votes
2 answers
How to change labels on the x axis of a bar plot from numbers to text?
I'm trying to make a bar plot using Plots.jl and the GR backend and wanted to ask how to make the x axis display text labels rather than numbers. Basically this is what I'm doing:
using Plots; gr()
data = [1,2,3]
labels =…

Ian Marshall
- 709
- 1
- 5
- 14
3
votes
1 answer
Line graph with asymmetric ribbon using Julia-Package "Plots"
I figured out how to plot a line graph with an asymmetric "ribbon" around it with the package "Gadfly" and the following code
x=collect(-10:10);
y=[i^2 for i in -10:10];
ymin = y-5;
ymax = y+10;
using Gadfly
plot(x=x, y=y, ymin=ymin, ymax=ymax,…

esel
- 901
- 9
- 20
2
votes
2 answers
Fill in Plots vspan saves as black
I create the plot I need in julia, but upon saving with savefig, the vspan fill is printed as black, although it is specified as very light red.
This is what is show in my notebook and I am savign
but when I save it as pdf, the red blocks become…

Jan Sila
- 1,554
- 3
- 17
- 36
2
votes
1 answer
Julia Plots.heatmap log scale of colors not working
I am currently trying to plot a matrix with heatmap using the following command
function plot_full_matrix(px, py, matrix)
full_px = vcat(reverse(-px)[1:end-1],px)
full_py = vcat(reverse(-py)[1:end-1],py)
heatmap(full_px, full_py, matrix,…

derdotte
- 81
- 7
2
votes
1 answer
How to convert a Julia plot (via Plots.jl) into a Matrix{RGB{N0f8}}
Matplotlib can convert a plot/figure into a RGB array as follows:
import matplotlib.pyplot as plt
import numpy as np
import io
fig, ax = plt.subplots()
n=256
I, J = np.indices((n, n))
im = ax.imshow((I | J) % 19,…

xecafe
- 740
- 6
- 12
2
votes
1 answer
Change number of breaks in colorbar heatmap Julia
I am trying to change the number of breaks in the legend of a heatmap. I am using the example from docs to make it reproducible:
using Unitful, Plots
xs = [string("x", i) for i = 1:10]
ys = [string("y", i) for i = 1:4]
z = float((1:4) *…

Quinten
- 35,235
- 5
- 20
- 53
2
votes
1 answer
Area limitation of plot in Plots.jl (GR) not works for series annotations. This is a bug or expected behavior?
If we want to draw the plot not over the entire set of values, but only over the selected area, this restriction only works for points, but does not work for their annotations. Is this the expected behavior? And if this is the expected behavior,…

Anton Degterev
- 591
- 2
- 12