Plot data using lines and or markers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in), | dimension(:) | :: | x | x-data for plot |
|
real(kind=wp), | intent(in), | dimension(:) | :: | y | y-data for plot |
|
character(len=*), | intent(in), | optional | :: | lineColor | Color of line |
|
character(len=*), | intent(in), | optional | :: | lineStyle | Style of line; '' for no line |
|
real(kind=wp), | intent(in), | optional | :: | lineWidth | Width of line |
|
character(len=*), | intent(in), | optional | :: | markColor | Color of markers, if any |
|
character(len=*), | intent(in), | optional | :: | markStyle | Style of markers; '' or absent for none |
|
real(kind=wp), | intent(in), | optional | :: | markSize | Size of markers, if any |
subroutine plot(x,y,lineColor,lineStyle,lineWidth,markColor,markStyle,markSize)
!! Plot data using lines and or markers
real(wp),dimension(:),intent(in)::x
!! x-data for plot
real(wp),dimension(:),intent(in)::y
!! y-data for plot
character(*),intent(in),optional::lineColor
!! Color of line
character(*),intent(in),optional::lineStyle
!! Style of line; '' for no line
real(wp),intent(in),optional::lineWidth
!! Width of line
character(*),intent(in),optional::markColor
!! Color of markers, if any
character(*),intent(in),optional::markStyle
!! Style of markers; '' or absent for none
real(wp),intent(in),optional::markSize
!! Size of markers, if any
real(pp),dimension(:),allocatable::xl,yl
character(32)::code
integer::k
xl = localize(x)
yl = localize(y)
if(present(lineColor)) call setColor(lineColor)
if(present(lineWidth)) call setLineWidth(lineWidth)
if(present(lineStyle)) then
call setLineStyle(lineStyle)
if(lineStyle/='') call plline(xl,yl)
else
call plline(xl,yl)
end if
call resetPen()
if(present(markColor)) call setColor(markColor)
if(present(markSize)) call plssym(0.0_pp,real(markSize,pp))
if(present(markStyle)) then
code = getSymbolCode(markStyle)
if(markStyle/='') then
do k=1,size(x)
call plptex(xl(k),yl(k),0.0_pp,0.0_pp,0.5_pp,code)
end do
end if
end if
call resetPen()
end subroutine plot