Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 79fa46d

Browse files
added a color test
1 parent b8aa998 commit 79fa46d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

‎test/color_test.f90

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
!*****************************************************************************************
2+
!>
3+
! Color test
4+
5+
program color_test
6+
7+
use pyplot_module, only : pyplot, wp => pyplot_wp
8+
9+
implicit none
10+
11+
type(pyplot) :: plt !! pytplot handler
12+
integer :: istat
13+
real(wp), parameter :: F(3) = [0.4510d0, 0.3098d0, 0.5882d0] ! Fortran-lang color
14+
real(wp), parameter :: Y(3) = [0.9608d0, 0.8157d0, 0.0118d0] ! Yellow
15+
16+
real(wp),dimension(3),parameter :: Ax = [1,2,3]
17+
real(wp),dimension(3),parameter :: Ay = [1,2,3]
18+
real(wp),dimension(3),parameter :: Bx = [1,2,3]
19+
real(wp),dimension(3),parameter :: By = [4,5,6]
20+
21+
call plt%initialize(figsize=[20,10],title='color test')
22+
23+
call plt%add_plot(Ax,Ay,label='',linestyle='o',markersize=5,color=F)
24+
call plt%add_plot(Bx,By,label='',linestyle='o',markersize=5,color=Y)
25+
26+
call plt%savefig('color_test.png', pyfile='color_test.py',istat=istat)
27+
28+
end program color_test
29+
!*****************************************************************************************

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /