Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
364d950
Add code for colorbar in 'contour_map.py'
yvonnefroehlich Nov 16, 2022
dcd190e
Add text for colorbar in 'contour_map.py'
yvonnefroehlich Nov 16, 2022
9acfacc
Add code for colorbar in 'grdview_surface.py'
yvonnefroehlich Nov 16, 2022
fc443f8
Add comments for colorbar in 'grdview_surface.py'
yvonnefroehlich Nov 16, 2022
a6dcddd
Add gridlines in 'grdview_surface.py'
yvonnefroehlich Nov 16, 2022
8a5724f
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Nov 18, 2022
34d1909
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Nov 19, 2022
6c62570
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Nov 19, 2022
3f3a39c
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Nov 20, 2022
c2e2ac5
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Nov 21, 2022
5f4723d
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Nov 21, 2022
6662e34
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 4, 2022
f9811c2
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 5, 2022
efe682c
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 8, 2022
96ce874
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 11, 2022
f0eab54
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 14, 2022
d19fb66
Set up colormap for earth relief grid in 'track_sampling.py'
yvonnefroehlich Dec 14, 2022
da4c672
Set up colormap for data points of track in 'track_sampling.py'
yvonnefroehlich Dec 14, 2022
72358b8
Use colormap for earth relief grid in 'track_sampling.py'
yvonnefroehlich Dec 14, 2022
03b5370
Use colormap for data points of track in 'track_sampling.py'
yvonnefroehlich Dec 14, 2022
55849dd
Add colorbar for earth relief grid in 'track_sampling.py'
yvonnefroehlich Dec 14, 2022
aca66f9
Add colorbar for data points of track in 'track_sampling.py'
yvonnefroehlich Dec 14, 2022
c89d20d
Fix typo in code
yvonnefroehlich Dec 14, 2022
aaf7fad
[format-command] fixes
actions-bot Dec 14, 2022
fa4093e
Change 'bathymetry' to 'elevation' for labels in 'track_sampling.py'
yvonnefroehlich Dec 14, 2022
7ba3c81
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 17, 2022
600536f
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 18, 2022
3fd7954
Improve comments in 'contour_map.py'
yvonnefroehlich Dec 18, 2022
a65ef57
Improve comments in 'grdview_surface.py'
yvonnefroehlich Dec 18, 2022
197ab7e
Improve comments in 'track_sampling.py'
yvonnefroehlich Dec 18, 2022
0f28961
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 20, 2022
60f2e90
Correct comment in 'contour.py' (code review)
yvonnefroehlich Dec 20, 2022
060df0c
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 20, 2022
edc5795
Fix line length in 'contour_map.py'
yvonnefroehlich Dec 20, 2022
b46db57
Format code (code review)
yvonnefroehlich Dec 21, 2022
9c76c2d
Reverse comment change (code review) in 'contour_map.py'
yvonnefroehlich Dec 21, 2022
74b4499
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 22, 2022
cd14cda
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 23, 2022
4e29ce5
Remove colormap files in 'track_sampling.py'
yvonnefroehlich Dec 24, 2022
2b57219
Format imports
yvonnefroehlich Dec 24, 2022
70ab2b6
Pass list through series parameter in 'track_sampling.py' (code review)
yvonnefroehlich Dec 24, 2022
7f96663
Improve comments in 'track_sampling.py'
yvonnefroehlich Dec 24, 2022
1fec414
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 25, 2022
1cde8bc
Merge branch 'main' into add-colorbars-examples
michaelgrund Dec 26, 2022
6407466
Set up colormaps within Figure object in 'trac_sampling.py'
yvonnefroehlich Dec 26, 2022
6223cf2
Improve comments in 'track_sampling.py'
yvonnefroehlich Dec 26, 2022
0744679
Improve comments for shorelines in 'track_sampling.py'
yvonnefroehlich Dec 26, 2022
a859aa3
Improve comment in 'track_sampling.py'
yvonnefroehlich Dec 26, 2022
47fc7e6
Improve comments in 'track_sapling.py'
yvonnefroehlich Dec 26, 2022
f357df8
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 26, 2022
87555ab
Fix typo in 'track_sampling.py'
yvonnefroehlich Dec 26, 2022
d35c167
Remove un-needed 'cmap=True' from colorbar in 'track_sampling.py' (co…
yvonnefroehlich Dec 26, 2022
71e79c8
Specific axis for colorbar label in 'track_sampling.py' (code review)
yvonnefroehlich Dec 26, 2022
0c3382c
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 27, 2022
0e9cf42
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 28, 2022
5a72d5e
Revert changes of 'track_sampling.py'
yvonnefroehlich Dec 28, 2022
ad2bd79
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 28, 2022
b7211fd
Merge branch 'main' into add-colorbars-examples
yvonnefroehlich Dec 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions examples/gallery/3d_plots/grdview_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ def ackley(x, y):
fig = pygmt.Figure()

# Plot grid as a 3-D surface
SCALE = 0.5 # in centimeter
SCALE = 0.5 # in centimeters
fig.grdview(
data,
frame=["a5f1", "za5f1"],
# Set annotations and gridlines in steps of five, and
# tick marks in steps of one
frame=["a5f1g5", "za5f1g5"],
projection=f"x{SCALE}c",
zscale=f"{SCALE}c",
surftype="s",
Expand All @@ -51,4 +53,10 @@ def ackley(x, y):
shading="+a45",
)

# Add colorbar for gridded data
fig.colorbar(
frame="a2f1", # Set annotations in steps of two, tick marks in steps of one
position="JRM", # Place colorbar at position Right Middle
)

fig.show()
4 changes: 3 additions & 1 deletion examples/tutorials/advanced/contour_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@
# :meth:`pygmt.Figure.grdcontour` to keep the contour lines visible on the
# final map. If the ``projection`` parameter is specified in the
# :meth:`pygmt.Figure.grdimage` method, it does not need to be repeated in the
# :meth:`pygmt.Figure.grdcontour` method.
# :meth:`pygmt.Figure.grdcontour` method. Finally, a colorbar is added using
# the :meth:`pygmt.Figure.colorbar` method.

fig = pygmt.Figure()
fig.grdimage(
Expand All @@ -102,4 +103,5 @@
grid=grid,
limit=[-4000, -2000],
)
fig.colorbar(frame=["x+lelevation", "y+lm"])
fig.show()