Skip to content

Commit

Permalink
Wrapper for psxy
Browse files Browse the repository at this point in the history
Works only with data in files for now.
  • Loading branch information
leouieda committed Jul 8, 2017
1 parent 961c04d commit 32ce456
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Binary file added gmt/tests/baseline/test_psxy_projection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gmt/tests/baseline/test_psxy_red_circles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions gmt/tests/test_psxy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""
Tests psxy.
"""
import os

from .utils import figure_comparison_test
from .. import figure, psxy


TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')
POINTS_DATA = os.path.join(TEST_DATA_DIR, 'points.txt')


@figure_comparison_test
def test_psxy_red_circles():
"Plot the data in red circles"
figure()
psxy(POINTS_DATA, R='10/70/-3/8', J='X4i', S='c0.2c', G='red', B='afg')


@figure_comparison_test
def test_psxy_projection():
"Plot the data in green squares with a projection"
figure()
psxy(POINTS_DATA, R='g', J='R270/4i', S='s0.2c', G='green', B='ag')

0 comments on commit 32ce456

Please sign in to comment.