Reputation: 597
I want to plot data, for example y=x^2+3x-4, using any library in julia like Makie.jl.
The problem is that all data point must be a small image loaded from a png file.
Please assume I know how to plot data using makie.jl with dots, like the following sample borrowed from a page of makie.jl.
I think the dots on the sample are drawn as vector graphics. I just want replace the dots with small images load from a png file. ( And if possible, I want that different dots represent different areas of the original png image. )
In addition, I want to put each small image at a precise coordinate with a precise size.
using GLMakie
using AbstractPlotting
AbstractPlotting.inline!(true)
scene = Scene()
points = [Point2f0(cos(t), sin(t)) for t in LinRange(0, 2pi, 20)]
colors = 1:20
scatter!(scene, points, color = colors, markersize = 15)
Edit: I found how to put an image onto the plot area. But I don't know how to crop a part of the load image. So that I can put each cropped sub image onto the plot area.
using GLMakie
using AbstractPlotting
using FileIO
img = rotr90(load("assets/cow.png"))
image(img)
Upvotes: 1
Views: 472
Reputation: 594
With GLMakie.jl as a backend, you can pass an array of images to marker
(or was it color?)!
Upvotes: 1