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

ultradian
  • 581
  • 5
  • 20
  • What you are using as the Plots.jl back-end? – Geeky I Dec 27 '16 at 05:44
  • It looks like plotlyjs from the aesthetics – Felipe Lema Dec 27 '16 at 14:00
  • @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). – ultradian Dec 27 '16 at 23:29
  • apparently, this is not supported in plots.jl, but it is supported in [plotlyjs using R](http://stackoverflow.com/questions/37596865/add-annotation-to-3d-scatterplot-in-plotly) – Felipe Lema Dec 28 '16 at 13:22

2 Answers2

1

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

Jesse Chan
  • 168
  • 9
0

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.

logankilpatrick
  • 13,148
  • 7
  • 44
  • 125