How to create a Bar Graph with a different colour for each bar

How to create a Bar Graph with a different colour for each bar

book

Article ID: KB0079328

calendar_today

Updated On:

Products Versions
Spotfire Statistica All Versions

Description

This article details how you can create a Bar Graph, and use different colours for each bar of the graph

 

Issue/Introduction

How to create a Bar Graph with a different colour for each bar

Environment

Windows

Resolution

To illustrate and example, I am using the Characteristics.sta dataset in Statistica's Examples dataset folder

1. Open Statistica and from the Graph Menu, select 2D, and choose Mean Graph with Error Plots

User-added image

2. Under the Advanced Tab, make the following changes (note that I have changed Graph Type to Columns and chosen the Grouping Interval Variable as Eye Colour) :

User-added image

3. Next, under the Categorized Tab, choose the layout as Overlaid, and then turn on X-Categories and choose your variable in here for defining colours (I am choosing to define my bars by Eye Colour): 

User-added image

The resulting graph will look similar to 

User-added image

4. Next, double click the graph to open the Graph Options Window. Under Plot on the left hand side of this window, choose Bars and then Click Multiple Areas. Here you will see the different colours of the bars. You can select each bar here separately and change the colour of it 

User-added image

A final note: to increase the width of each bar, in the Graph Options Window under Plot, choose Box/Whisker. Under Properties, you can change the width of the box:

User-added image