diff --git a/pygmt/src/pygmtlogo.py b/pygmt/src/pygmtlogo.py index 755fd3d92a7..77d85cf8e94 100644 --- a/pygmt/src/pygmtlogo.py +++ b/pygmt/src/pygmtlogo.py @@ -75,7 +75,7 @@ def _create_logo( # noqa: PLR0915 hex_factor = 1.0 case "hexagon": symbol = "h" - size_shape = (r0 + 0.34) * 2 + size_shape = (r0 + r1) / np.cos(np.deg2rad(30)) hex_factor = 1.1 # Define wordmark diff --git a/pygmt/tests/baseline/test_pygmtlogo_design_hexagon-horizontal.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_design_hexagon-horizontal.png.dvc new file mode 100644 index 00000000000..ea880e8ee7b --- /dev/null +++ b/pygmt/tests/baseline/test_pygmtlogo_design_hexagon-horizontal.png.dvc @@ -0,0 +1,5 @@ +outs: +- md5: 1ab652c5ba076ee29a0c1c1c336bf281 + size: 357515 + hash: md5 + path: test_pygmtlogo_design_hexagon-horizontal.png diff --git a/pygmt/tests/baseline/test_pygmtlogo_design_hexagon-vertical.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_design_hexagon-vertical.png.dvc new file mode 100644 index 00000000000..84e2e798a21 --- /dev/null +++ b/pygmt/tests/baseline/test_pygmtlogo_design_hexagon-vertical.png.dvc @@ -0,0 +1,5 @@ +outs: +- md5: 7c63ae282d62472c4420a1dd482fce97 + size: 195380 + hash: md5 + path: test_pygmtlogo_design_hexagon-vertical.png diff --git a/pygmt/tests/baseline/test_pygmtlogo_wordmark_horizontal_hexagon.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_wordmark_horizontal_hexagon.png.dvc new file mode 100644 index 00000000000..a0c344b992e --- /dev/null +++ b/pygmt/tests/baseline/test_pygmtlogo_wordmark_horizontal_hexagon.png.dvc @@ -0,0 +1,5 @@ +outs: +- md5: a2af1063edc39f78976bce5a6ff76bef + size: 55897 + hash: md5 + path: test_pygmtlogo_wordmark_horizontal_hexagon.png diff --git a/pygmt/tests/baseline/test_pygmtlogo_wordmark_none_hexagon.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_wordmark_none_hexagon.png.dvc new file mode 100644 index 00000000000..8f4a83f7d14 --- /dev/null +++ b/pygmt/tests/baseline/test_pygmtlogo_wordmark_none_hexagon.png.dvc @@ -0,0 +1,5 @@ +outs: +- md5: f821a40456a61abe7859685cc90080a9 + size: 28794 + hash: md5 + path: test_pygmtlogo_wordmark_none_hexagon.png diff --git a/pygmt/tests/baseline/test_pygmtlogo_wordmark_vertical_hexagon.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_wordmark_vertical_hexagon.png.dvc new file mode 100644 index 00000000000..1e6689fa923 --- /dev/null +++ b/pygmt/tests/baseline/test_pygmtlogo_wordmark_vertical_hexagon.png.dvc @@ -0,0 +1,5 @@ +outs: +- md5: 7b7919375c9dbc354c8ef5f86a33e830 + size: 37203 + hash: md5 + path: test_pygmtlogo_wordmark_vertical_hexagon.png diff --git a/pygmt/tests/test_pygmtlogo.py b/pygmt/tests/test_pygmtlogo.py index 5346e1d1b15..feaf9c1a3d4 100644 --- a/pygmt/tests/test_pygmtlogo.py +++ b/pygmt/tests/test_pygmtlogo.py @@ -10,7 +10,7 @@ @pytest.mark.mpl_image_compare(savefig_kwargs={"dpi": 600}) @pytest.mark.parametrize("wordmark", ["horizontal", "vertical"]) -@pytest.mark.parametrize("shape", ["circle"]) +@pytest.mark.parametrize("shape", ["circle", "hexagon"]) def test_pygmtlogo_design(shape, wordmark): """ Test the design details of the PyGMT logo with a wordmark. @@ -24,7 +24,7 @@ def test_pygmtlogo_design(shape, wordmark): @pytest.mark.mpl_image_compare -@pytest.mark.parametrize("shape", ["circle"]) +@pytest.mark.parametrize("shape", ["circle", "hexagon"]) def test_pygmtlogo_wordmark_none(shape): """ Test the PyGMT logo without the wordmark, including both light/dark themes, and @@ -52,7 +52,7 @@ def test_pygmtlogo_wordmark_none(shape): @pytest.mark.mpl_image_compare -@pytest.mark.parametrize("shape", ["circle"]) +@pytest.mark.parametrize("shape", ["circle", "hexagon"]) def test_pygmtlogo_wordmark_horizontal(shape): """ Test the PyGMT logo with a horizontal wordmark, including both light/dark themes, @@ -81,7 +81,7 @@ def test_pygmtlogo_wordmark_horizontal(shape): @pytest.mark.mpl_image_compare -@pytest.mark.parametrize("shape", ["circle"]) +@pytest.mark.parametrize("shape", ["circle", "hexagon"]) def test_pygmtlogo_wordmark_vertical(shape): """ Test the PyGMT logo with a vertical wordmark, including both light/dark themes,