Documentation (For full version, run make.jl in docs).
Note: to view full API information, build documentation by running julia docs/make.jl
PLOTLAB provides quick recipes for plotting trajectories using the MATLAB engine.
PLOTLAB.jl is a Julia wrapper to these MATLAB routines for generating plots directly from Julia, based on MATLAB.jl.
plot_earth_geoid() function)MATLAB.jl works on local Julia environment (install MATLAB, install csh)git clone this repository & cd into PLOTLAB, then on Julia REPL ]dev .using PLOTLAB or import PLOTLABMATLAB.jl, DocStringExtensionsplot3quiver3scatter3Creating a new MATLAB figure is as easy as
PLOTLAB.figure()
The PLOTLAB.figure() accepts optional parameters of the figure; here are some useful ones:
view::Int: 2 for 2D, 3 for 3D view plotaxis_equal::Bool: whether to set equal axesxlabel::String, ylabel::String, zlabel::String: names of axesxlim::Vector{Real}, ylim::Vector{Real}, zlim::Vector{Real}: limits on axesSo many options for defining colors of your plots!
color_list = cgrad(:hawaii) # define a color palette alla moda di julia's plots
PLOTLAB.plot3(traj1[1,:], traj1[2,:], traj1[3,:], lw=1.5, color="blue") # MATLAB color names
PLOTLAB.plot3(traj2[1,:], traj2[2,:], traj2[3,:], lw=1.5, color=:gold) # Julia color symbol
PLOTLAB.plot3(traj3[1,:], traj3[2,:], traj3[3,:], lw=1.5, color=[1.0, 0.0, 0.0]) # vector [r,g,b]
PLOTLAB.plot3(traj4[1,:], traj4[2,:], traj4[3,:], lw=1.5, color=color_list[1]) # color object
import PLOTLAB
PLOTLAB.close_all() # close all figure
fig = PLOTLAB.figure(
3,
size=[200,200,500,500],
box=true
) # create new figure
# plot Earth
ticks = [-1.5, -1.0, -0.5, 0, 0.5, 1.0, 1.5]
PLOTLAB.plot_earth_geoid(1.0, ticks)
# save
PLOTLAB.saveas(fig, "example_geoid.png")
./examples for moreThe MATLAB routines can of course be used directly by adding path.
git clone this repositoryaddpath to the src/matlab directory in MATLAB, i.e.addpath('/path/to/PLOTLAB/src/matlab')