If you are looking for software to use, go to Huajun Software Park! software release
Location: front pageTutorial strategyTutorialComputer software tutorials How does Stata...

How to adjust the color of the histogram cylinder in Stata - Stata introductory tutorial

Author: Qingchen Date: 2021-02-17

STATA
STATA-17.0 official version

science tools Storage: 856.71MB Time: 2022-04-18

Software introduction: Stata official version is a very excellent practical science statistics software. Stata official version is powerful, efficient and professional, and provides data analysis...

Download now

Recently, many friends have said that they still don’t know how to use Stata to adjust the color of the histogram cylinder. Today I will share with you how to adjust the color of the histogram cylinder in Stata. Friends in need can take a look. I hope Can help everyone.

First, open Stata. Here I take the sample database (1978 automobile data) as an example and enter the command: sysuse auto.dta,clear

How to adjust the color of the histogram cylinder in Stata?
How to adjust the color of the histogram cylinder in Stata?

For the convenience of demonstration, we only draw a histogram for the variable weight this time. Enter the command: histogram weight

As shown in the figure, the default histogram cylinder color is gray.

How to adjust the color of the histogram cylinder in Stata?

Next, we add a command to modify the vertical parameters in the drawing command, and set the color to green: vertical color(green)

How to adjust the color of the histogram cylinder in Stata?

As shown in the picture below, the modified histogram cylinder is green. If you want to modify other colors, just modify the corresponding words in ertical color(green).

How to adjust the color of the histogram cylinder in Stata?

The above is the method shared by the editor to adjust the color of the histogram cylinder in Stata. Friends who are not familiar with it can learn it.

Related articles