barh Subroutine

public subroutine barh(y, x, c, relWidth, fillColor, fillPattern, lineColor, lineWidth)

Create a horizontal bar graph

Arguments

Type IntentOptional AttributesName
real(kind=wp), intent(in), dimension(:):: y

y-positions of the bars' centers

real(kind=wp), intent(in), dimension(:):: x

x-positions of the bars' tops

real(kind=wp), intent(in), optional dimension(:):: c

Color scale for bars

real(kind=wp), intent(in), optional :: relWidth

Relative width of bars

character(len=*), intent(in), optional :: fillColor

Color of bar fills

character(len=*), intent(in), optional :: fillPattern

Pattern of bar fills

character(len=*), intent(in), optional :: lineColor

Color of lines around bars

real(kind=wp), optional :: lineWidth

Width of lines around bars

Calls

proc~~barh~~CallsGraph proc~barh barh plcol1 plcol1 proc~barh->plcol1 plfill plfill proc~barh->plfill interface~mixval mixval proc~barh->interface~mixval plline plline proc~barh->plline
Help

Called By

proc~~barh~~CalledByGraph proc~barh barh proc~dobar doBar proc~dobar->proc~barh program~examples_prg examples_prg program~examples_prg->proc~dobar
Help

Source Code


Source Code

	subroutine barh(y,x,c,relWidth,fillColor,fillPattern,lineColor,lineWidth)
		!! Create a horizontal bar graph
		real(wp),dimension(:),intent(in)::y
			!! y-positions of the bars' centers
		real(wp),dimension(:),intent(in)::x
			!! x-positions of the bars' tops
		real(wp),dimension(:),intent(in),optional::c
			!! Color scale for bars
		real(wp),intent(in),optional::relWidth
			!! Relative width of bars
		character(*),intent(in),optional::fillColor
			!! Color of bar fills
		character(*),intent(in),optional::fillPattern
			!! Pattern of bar fills
		character(*),intent(in),optional::lineColor
			!! Color of lines around bars
		real(wp),optional::lineWidth
			!! Width of lines around bars
		
		real(pp),dimension(4)::xl,yl
		real(pp),dimension(2)::cb
		real(pp)::dy,dys
		integer::k
		
		cb = 0.0_wp
		if(present(c)) cb = real(mixval(c),pp)
		dys = 0.8_pp
		if(present(relWidth)) dys = real(relWidth,pp)
		dy = dys*real(y(2)-y(1),pp)/2.0_pp
		
		if(present(lineWidth)) call setLineWidth(lineWidth)
		
		do k=1,size(x)
			yl = real([y(k)-dy,y(k)-dy,y(k)+dy,y(k)+dy],pp)
			xl = real([0.0_wp,x(k),x(k),0.0_wp],pp)
			
			if(present(fillColor)) call setColor(fillColor)
			if(present(fillPattern)) call setFillPattern(fillPattern)
			if(present(c)) call plcol1( real( (c(k)-cb(1))/(cb(2)-cb(1)) ,pp) )
			call plfill(xl,yl)
			
			if(present(lineColor)) call setColor(lineColor)
			call plline(xl,yl)
		end do
		call resetPen()
	end subroutine barh


abs abs_t acos_t ad_t add_t arg arrayToChar asin_t assignment(=) atan_t bar barh biCGSTAB_t biConjugateGradientStabilized binData box charToArray checkPrecision colorbar colorbar2 colorize colorMap config_t conjg conjugateGradient conjugateGradient_t contour contourf cos_a cos_t cpuTime cubicSpline_t deDup DFT div_t doBar doContour doError doFillBetween doFunction doHist doLegend doLogPlot doPlot doQuiver doScatter doSurface endsWith errorbar eval_test eval_testN evalR_abs evalR_acos evalR_add evalR_asin evalR_atan evalR_cos evalR_div evalR_exp evalR_imag evalR_log evalR_log10 evalR_mul evalR_neg evalR_p evalR_pow evalR_real evalR_sin evalR_sqrt evalR_sub evalR_tan evalR_var evalZ_abs evalZ_acos evalZ_add evalZ_asin evalZ_atan evalZ_cos evalZ_div evalZ_exp evalZ_imag evalZ_log evalZ_log10 evalZ_mul evalZ_neg evalZ_p evalZ_pow evalZ_real evalZ_sin evalZ_sqrt evalZ_sub evalZ_tan evalZ_var exp exp exp_t f FFT FFT_freq figure fillBetween fillBetweenx findInterval flatten function_t gaussSeidel gaussSeidel_t hist iDFT iFFT imag_t intToChar inv jacobi jacobi_t labels legend linearInterp linearSpline_t lineSearch_t linspace log log log10 log10 log10_t log_t makeLogo matmul matmul maxval mean meshGridX meshGridY minimumResidual minval mixval mul_t neg_t newAbs newAcos newAdd newAsin newAtan newCos newDiv newExp newImag newIterator newLog newLog10 newMul newNeg newNodeStack newPow newReal newSin newSparse newSpvec newSqrt newSub newTan newToken newVar nint nodeStack_t norm2 norm2 operator(*) operator(*) operator(*) operator(**) operator(+) operator(+) operator(+) operator(-) operator(-) operator(.d.) operator(.o.) operator(.o.) operator(.oo.) operator(.sx.) operator(.x.) operator(/) operator(/) operator(<) operator(>) plot plot3 pop pow_t printTypes push quat_t quiver randomNormal randomUniform readGrid readStep real_t realToChar realToTime removeSpaces scaler scatter setRandomSeed setup show showProgress sin_a sin_t solveLU solveLU solverProgress SOR_t span sqrt sqrt_t startReport startsWith stDev steepestDescent sub_t subplot successiveOverRelaxation sum sum surface symmetricGaussSeidel symmetricSuccessiveOverRelaxation tan_a tan_t TDMA TDMA testBasic testBasicSolvers testColorize testColorMap testConstants testCpuTime testDeDup testDiff testDot testEndsWith testFFT testFlatten testFunction testIFFT testIntToChar testLinearInterp testLinspace testLU testMean testMeshGrid testMixval testNewConfig testNewSparse testNewSpline testNext testObjective testObjectiveN testPlot testPrecision testRandomNormal testRandomUniform testRead testReadGmsh testRealToChar testRealToTime testRemoveSpaces testSetRandomSeed testSolvers testSpan testSplineX testSpvec testStartsWith testStDev testTDMA testWallTime testWrite testWriteMat testWriteVTK testWriteVTK ticks title token_t tokenize toRPN transpose v2m var_t vector wait wallTime wireframe writeGrid writeGridVTK writeHeaderVTK writeMat writeScalarVTK writeStep writeVectorVTK xlabel xlim xticks xylim xyzlim ylabel ylim yticks