Category: Visualization and Plotting

Problem using margin on plots

using Plots # Create a scatter plot scatter([1, 2, 3, 4], [5, 6, 7, 8], margin=5mm) Solution 1: Using the `margin` argument One way to solve the problem of using margin on

Read More »

Plotly slider how to change data values

using PlotlyJS # Create initial data x = 1:10 y = x.^2 # Create initial plot trace = scatter(x=x, y=y, mode=”lines+markers”) layout = Layout(title=”Plotly Slider Example”, xaxis_title=”X”, yaxis_title=”Y”) plot([trace], layout) # Define

Read More »

How to set xlabel and ylabel in makie recipe

using Makie function set_labels(scene::SceneLike, xlabel::AbstractString, ylabel::AbstractString) xaxis!(scene, xlabel) yaxis!(scene, ylabel) end scene = Scene() scatter!(scene, rand(10), rand(10)) set_labels(scene, “X”, “Y”) display(scene) Solution 1: Using the set_labels function To set the xlabel and

Read More »

Labels in pie charts in makie

using Makie function pie_chart_with_labels(labels, values) fig = Figure() ax = Axis(fig[1, 1]) pie!(ax, values, labels=labels) fig end labels = [“A”, “B”, “C”, “D”] values = [10, 20, 30, 40] fig = pie_chart_with_labels(labels,

Read More »