How to make 3D annotations in Julia Plots
Asked Answered
E

2

9

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, tvec)
annotate!(pi/2,1.0,"max")
annotate!(3*pi/2,-1.0,"min")

produces enter image description here but how do you add something to

tvec=0:0.1:4*pi
plot(tvec, sin(tvec), cos(tvec))

Using the same type of annotate! command seems to annotate onto a superimposed 2D coordinate. enter image description here

Excisable answered 26/12, 2016 at 16:44 Comment(4)
What you are using as the Plots.jl back-end?Derwin
It looks like plotlyjs from the aestheticsSpirketing
@FelipeLema is correct. I used plotly which I like as it lets me rotate the view of the 3D image. The annotate phenomena I mentioned occurs there, but not in pyplot as pyplot only annotates the 2D. I can edit and add images if helpful (I'm new to this stuff so always appreciate learning how to make questions/comments better).Excisable
apparently, this is not supported in plots.jl, but it is supported in plotlyjs using RSpirketing
W
1

Seems like it's not available yet https://github.com/JuliaPlots/Plots.jl/issues/362

Wadsworth answered 20/11, 2022 at 23:11 Comment(0)
F
1

According to the Julia Plots (Plots.jl) docs found here, GR, PyPlot, and Plotly(JS) all support 3D plots in some form. It is worth diving into some examples here to explore how these different backends support 3D plots.

Fossil answered 19/1, 2021 at 15:53 Comment(0)
W
1

Seems like it's not available yet https://github.com/JuliaPlots/Plots.jl/issues/362

Wadsworth answered 20/11, 2022 at 23:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.