doLegend Subroutine

subroutine doLegend()

Arguments

None

Description

legend

Calls

proc~~dolegend~~CallsGraph proc~dolegend doLegend proc~plot plot proc~dolegend->proc~plot proc~ticks ticks proc~dolegend->proc~ticks proc~xylim xylim proc~dolegend->proc~xylim proc~legend legend proc~dolegend->proc~legend proc~linspace linspace proc~dolegend->proc~linspace proc~labels labels proc~dolegend->proc~labels interface~mixval mixval proc~dolegend->interface~mixval proc~figure figure proc~dolegend->proc~figure proc~subplot subplot proc~dolegend->proc~subplot plline plline proc~plot->plline plssym plssym proc~plot->plssym plptex plptex proc~plot->plptex plbox plbox proc~ticks->plbox plwind plwind proc~xylim->plwind none~dolines doLines proc~legend->none~dolines pllegend pllegend proc~legend->pllegend none~domarkers doMarkers proc~legend->none~domarkers none~dolegendbox doLegendBox proc~legend->none~dolegendbox none~dotext doText proc~legend->none~dotext none~doboxes doBoxes proc~legend->none~doboxes pllab pllab proc~labels->pllab pleop pleop proc~figure->pleop plbop plbop proc~figure->plbop pladv pladv proc~figure->pladv plssub plssub proc~figure->plssub proc~subplot->pladv proc~subplot->plssub plvasp plvasp proc~subplot->plvasp plvsta plvsta proc~subplot->plvsta plvpor plvpor proc~subplot->plvpor series series none~dolines->series none~domarkers->series none~getcorner getCorner none~dolegendbox->none~getcorner none~dotext->series none~doboxes->series proc~startswith startsWith none~getcorner->proc~startswith proc~endswith endsWith none~getcorner->proc~endswith
Help

Called By

proc~~dolegend~~CalledByGraph proc~dolegend doLegend program~examples_prg examples_prg program~examples_prg->proc~dolegend
Help

Variables

TypeVisibility AttributesNameInitial
integer, public, parameter:: N =20
real(kind=wp), public, dimension(N):: x
real(kind=wp), public, dimension(N):: y
character(len=32), public, dimension(3,7):: series

Source Code

	subroutine doLegend
		!! ![legend](|media|/example-4.svg)
		integer,parameter::N = 20
		real(wp),dimension(N)::x,y
		character(32),dimension(3,7)::series
		
		x = linspace(0.0_wp,1.0_wp,N)
		y = x**2-1.0_wp
		
		call figure()
		call subplot(1,1,1)
		call xylim(mixval(x),mixval(y))
		
		call plot(x,y,lineColor='red',lineWidth=2.0_wp, &
			& markStyle='.',markColor='cyan',markSize=2.0_wp)
		
		call plot(x,-1.0_wp-y,lineColor='blue',lineStyle=':',lineWidth=2.0_wp, &
			& markStyle='+',markColor='green',markSize=1.0_wp)
		
		! [name,textColor,lineStyle,lineColor,markStyle,markColor]
		series(1,:) = [character(32)::'f(x)=x#u2#d-1','','-','r','.','c','']
		series(2,:) = [character(32)::'g(x)=-x#u2#d','',':','b','+','g','']
		series(3,:) = [character(32)::'Box','','','','','','r']
		
		call legend('center left',series)
		call ticks()
		call labels('x','y','')
	end subroutine doLegend