I want to use something in Julia similar to rotate3d in Matlab so I can rotate the figures I produce. My base code looks like this:
function plotPatch()
fig = figure()
ax = Axes3D(fig)
ax[:mouse_init]()
ax[:set_xlim3d](left=-0.6, right=0.6)
ax[:set_ylim3d](bottom=-0.6, top=0.6)
ax[:set_zlim3d](bottom=-0.6, top=0.6)
end```
I've googled this and I found: ```ax[:mouse_init]() ``` but nothing happens when I include that in the code.. (no error messages but I'm still not able to rotate the plot). Could I solve it in another way? I'd like to use PyPlot for this therefore I'm especially thankful for tips on how to solve this using PyPlot if that is possible.
Put whatever code you want to run when Julia starts in your .juliarc.jl file. I like to put in packages and paths that I use every day in there as well. Look about halfway down that page I linked to to find reference to .juliarc.jl.
Thank you for your help. I’ve created the .juliarc.jl file but I still don’t understand how I should include ion()? Maybe my question is just how to use ion(). I googled it and found the python code:
plt.ion()
plt.plot([1.6, 2.7])```
but I still don't understand how to transform this to Julia code?