Questions tagged [plots.jl]

Plotting interface and wrapper for several julia plotting packages

Useful links

205 questions
21
votes
2 answers

How to move the legend to outside the plotting area in Plots.jl (GR)?

I have the following plot where part of the data is being obscured by the legend: using Plots; gr() using StatPlots groupedbar(rand(1:100,(10,10)),bar_position=:stack, label="item".*map(string,collect(1:10))) I can see that using the "legend"…
Ian Marshall
  • 709
  • 1
  • 5
  • 14
12
votes
1 answer

How to change line width in figure legend in julia Plots?

using Plots plot(1:1:5, 1:1:5, linewidth=1) plot!(1:1:5, 1:2:10, linewidth=5) Is it possible to make the legend line width match the line width in the plot? I couldn't find anything in the documentation unfortunately.
miha priimek
  • 919
  • 6
  • 20
12
votes
1 answer

Plots.jl: remove series legend, keep color bar

Using Plots.jl I can make a scatter plot from two vectors with color set by another vector as follows: using Plots scatter([1,3,5,7], [2,4,6,10], marker_z = [1,1,2,3]) There is both a legend for the series, and there is a color bar. If I set…
Ben S.
  • 3,415
  • 7
  • 22
  • 43
12
votes
3 answers

Plots.jl - Turn off axis and grid lines

I am trying to make a surface plot without the axis and grid lines. I found that I can turn off the grid with grid = false but I can't find a way to remove the axis lines. surface(x2d, y2d, z2d, fill_z = color_mat, fc = :haline,…
nalyd88
  • 4,940
  • 8
  • 35
  • 51
11
votes
4 answers

Adding global title to Plots.jl subplots

I would like to add a global title to a group of subplots using Plots.jl. Ideally, I'd do something like: using Plots pyplot() plot(rand(10,2), plot_title="Main title", title=["A" "B"], layout=2) but, as per the Plots.jl documentation, the…
Nicolas Payette
  • 14,847
  • 1
  • 27
  • 37
10
votes
2 answers

How do you add markers to the legend of a Plots.jl plot?

The code using Plots pyplot(markershape = :auto) for i in 1:4 plot!(rand(10), label = "Series " * string(i)) end savefig("Plot.png") produces the following plot: The markers do not appear in the legend, only the data series's line color. This…
tparker
  • 689
  • 1
  • 6
  • 17
9
votes
4 answers

How to fill area between curves with Plots.jl?

Suppose I have a curve y, and two other curves u and l in the form of vectors. How to plot: plot(y, lab="estimate") plot!(y-l, lab="lower bound") plot!(y+u, lab="upper bound") That is, an asymmetric confidence interval? I know how to plot the…
juliohm
  • 3,691
  • 2
  • 18
  • 22
9
votes
1 answer

custom colorgradient heatmap in Julia

I am currently using the Plots package and have it along with the PyPlot packages installed. With the code using Plots y = rand(10, 10) pyplot() plt = plot(y, st=:heatmap, clim=(0,1), color=:coolwarm, colorbar_title="y") I am able to produce…
JBar
  • 145
  • 3
  • 6
9
votes
2 answers

How to make 3D annotations in Julia Plots

The annotation attribute in Julia Plots seems to only take tuples of x,y coordinates and a label according to the documentation. Is there any way to do this on a 3D plot? For example: tvec=0:0.1:4*pi plot(sin,…
ultradian
  • 581
  • 5
  • 20
9
votes
1 answer

Julia PyPlot: plot 3D surface with as face colors the norm of surface gradient

Does anyone know how to plot a 3D surface with Julia's Pyplot with e.g the norm of the surface-gradient as the face color? Similar to this topic for Python: Color matplotlib plot_surface command with surface gradient
René Hiemstra
  • 117
  • 1
  • 4
8
votes
3 answers

How to clean Plots (GR) without closing Julia environment

I'm debugging a script (which use Plots.jl with GKS QtTerm backend). So I run the script many times. When I run it from terminal like bash> julia pointPlacement.jl it takes for ages to initialize Julia and Plots.jl (this is one big inconvenience in…
Prokop Hapala
  • 2,424
  • 2
  • 30
  • 59
8
votes
4 answers

Multiple Axis with Plots.jl

Is there a way to have the second dataset plot on a separate axis, overlaid on the first plot? using Plots; gadfly(size=(800,400)) plot(Vector[randn(100)], line = ([:green], :step)) plot!(Vector[randn(100)], line = ([:red], :step))
BAR
  • 15,909
  • 27
  • 97
  • 185
7
votes
1 answer

How to scale the fontsizes using Plots.jl

is there a way to rescale all the fontsizes (legend, tickslabels, axislabels…) at once? Original question from Filippo Vicentini on Slack.
Lufu
  • 436
  • 4
  • 11
7
votes
1 answer

Supressing some labels in legend or putting sampled markers

I am using Julia 1.1.0 and want to do some plotting in it. I am using Plots and pyplot backend for that. I have two data that I want to plot with the same line style and color, differing them by markers. Here is an example: using Plots pyplot() nf =…
7
votes
1 answer

Color of errorbars with plots.jl

I'm using the package Plots with the pyplot backend. By default, errorbars are black. How can I change their color? I want to set it to the same color as the line itself (which should be the default behaviour imho). using…
T. Lepage
  • 123
  • 1
  • 6
1
2 3
13 14