Skip to content

Commit

Permalink
Add cubeside example.
Browse files Browse the repository at this point in the history
  • Loading branch information
joa-quim committed Sep 3, 2023
1 parent a0cbfb4 commit b2c0e81
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions examples/misc/cube_sides.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Plot on the sides of a cube

This example shows how we can plot images on the sides of a cube. We can print them either on the back side
and use the left available space to plot another *thing*, as in:

\begin{examplefig}{}
```julia
using GMT

viz(GMT.peaks(N=100), zsize=8, facades=(GMT.TESTSDIR * "cenora_base.jpg",
GMT.TESTSDIR * "bunny_cenora.webp",
GMT.TESTSDIR * "burro_cenora.webp"))
```
\end{examplefig}

The above example used the helper function \myreflink{imshow} (well, it's alias ``viz``) that knew what to do when
it found the keyword `facades`, but in fact the work was done by the function \myreflink{cubeplot}. Next example shows
how to call that function directly to plot three images in the front sides of the cube.

\begin{examplefig}{}
```julia
using GMT # Hide

cubeplot(GMT.TESTSDIR * "seila_gray.jpg",
GMT.TESTSDIR * "seis_section_rgb.jpg",
GMT.TESTSDIR * "seis_section_gray.jpg",
zsize=6, show=true)
```
\end{examplefig}

0 comments on commit b2c0e81

Please sign in to comment.