Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • Compute Services
  • System Modeler
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

Wolfram Consulting

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Notebook Assistant + LLM Kit
    • Compute Services
    • System Modeler
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
MatrixGamePlot
  • See Also
    • MatrixGame
    • TreeGamePlot
    • FindMatrixGameStrategies
  • Related Guides
    • Game Theory
    • See Also
      • MatrixGame
      • TreeGamePlot
      • FindMatrixGameStrategies
    • Related Guides
      • Game Theory

MatrixGamePlot[mgame]

generates a plot of the MatrixGame mgame.

MatrixGamePlot[mgame,strat]

highlight the game strategy strat.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Two-Player Games  
Multiplayer Games  
Options  
ColorFunction  
ColorFunctionScaling  
GameActionLabels  
GamePlayerLabels  
PlotLayout  
PlotLegends  
Applications  
Recreational Games  
Social Games  
Prisoner's Dilemma  
Economics Games  
Symmetry in Games  
Neat Examples  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • MatrixGame
    • TreeGamePlot
    • FindMatrixGameStrategies
  • Related Guides
    • Game Theory
    • See Also
      • MatrixGame
      • TreeGamePlot
      • FindMatrixGameStrategies
    • Related Guides
      • Game Theory

MatrixGamePlot

MatrixGamePlot[mgame]

generates a plot of the MatrixGame mgame.

MatrixGamePlot[mgame,strat]

highlight the game strategy strat.

Details and Options

  • MatrixGamePlot is typically used to communicate and understand a matrix game.
  • In a two-player game, there is a matrix of payoff vectors. Each vector represents the payoff for each player.
  • The following is a plot of a two-player game where payoffs are plotted as charts and colored according to the player:
  • Strategies may also be represented by the thickness of the line over each player row or column. The order of the player action is from top to bottom and from left to right:
  • When there are multiple players on rows or columns, a row or column is used for each combination for player actions:
  • MatrixGamePlot has the same options as Graphics, with the following additions and changes: [List of all options]
  • ColorFunction Automatichow to color payoffs for each player
    ColorFunctionScaling Falsewhether to scale arguments to ColorFunction
    GameActionLabels Automaticlabels to use for actions
    GamePlayerLabels Automaticlabels to use for players
    PlotLayout Automaticspecifies the layout of squares and rows
    PlotLegends Automaticlegends for payoff values
  • ColorData["DefaultPlotColors"] gives the default sequence of colors used by ColorFunction.
  • Possible settings for PlotLayout are:
  • "BarChart"plot each payoff square as a BarChart
    "SplitSquare"plot each payoff square as a split square
    {{r1,…,rk},{c1,…,cn-k}}change the row players and column players
    {"SplitSquare",{{…},{…}}}combine the two previous options
  • Note that the payoff array may be reshaped to become a matrix with players {r1,…,rk} as row players and {c1,…,cn-k} as column players. For example, if there are five players, the default ordering may divide the first two players ({1,2}) on rows and the three other players ({3,4,5}) on columns. This order may be changed using this option.
  • List of all options

    • AlignmentPointCenterthe default point in the graphic to align with
      AspectRatioAutomaticratio of height to width
      AxesFalsewhether to draw axes
      AxesLabelNoneaxes labels
      AxesOriginAutomaticwhere axes should cross
      AxesStyle{}style specifications for the axes
      BackgroundNonebackground color for the plot
      BaselinePositionAutomatichow to align with a surrounding text baseline
      BaseStyle{}base style specifications for the graphic
      ColorFunctionAutomatichow to color payoffs for each player
      ColorFunctionScalingFalsewhether to scale arguments to ColorFunction
      ContentSelectableAutomaticwhether to allow contents to be selected
      CoordinatesToolOptionsAutomaticdetailed behavior of the coordinates tool
      Epilog{}primitives rendered after the main plot
      FormatTypeTraditionalFormthe default format type for text
      FrameFalsewhether to put a frame around the plot
      FrameLabelNoneframe labels
      FrameStyle{}style specifications for the frame
      FrameTicksAutomaticframe ticks
      FrameTicksStyle{}style specifications for frame ticks
      GameActionLabelsAutomaticlabels to use for actions
      GamePlayerLabelsAutomaticlabels to use for players
      GridLinesNonegrid lines to draw
      GridLinesStyle{}style specifications for grid lines
      ImageMargins0.the margins to leave around the graphic
      ImagePaddingAllwhat extra padding to allow for labels etc.
      ImageSizeAutomaticthe absolute size at which to render the graphic
      LabelStyle{}style specifications for labels
      MethodAutomaticdetails of graphics methods to use
      PlotLabelNonean overall label for the plot
      PlotLayoutAutomaticspecifies the layout of squares and rows
      PlotLegendsAutomaticlegends for payoff values
      PlotRangeAllrange of values to include
      PlotRangeClippingFalsewhether to clip at the plot range
      PlotRangePaddingAutomatichow much to pad the range of values
      PlotRegionAutomaticthe final display region to be filled
      PreserveImageOptionsAutomaticwhether to preserve image options when displaying new versions of the same graphic
      Prolog{}primitives rendered before the main plot
      RotateLabelTruewhether to rotate y labels on the frame
      TicksAutomaticaxes ticks
      TicksStyle{}style specifications for axes ticks

Examples

open all close all

Basic Examples  (4)

Generate a two-player matrix game:

Plot the game:

Generate the Prisoner's Dilemma:

Plot the game using split squares:

Generate a game:

Show strategies using an array of the same dimensions as the GameActionLabels array:

Generate the Nash Poker game:

Plot the game such that the third player is on the rows:

Scope  (5)

Two-Player Games  (3)

Generate a two-player zero-sum matrix game:

Plot the game:

Generate a two-player matrix game:

Plot the game:

Generate a Stag Hunt game:

Plot the game:

Multiplayer Games  (2)

Generate a four-player matrix game:

Plot the game using split squares:

Generate a Volunteer's Dilemma game with four players:

Plot the game to demonstrate its symmetry:

Options  (6)

ColorFunction  (1)

Generate a game:

Specify the color scheme used as seen in ColorData:

ColorFunctionScaling  (1)

Generate a game:

Specify the color scaling for continuous color schemes between 0 and 1:

GameActionLabels  (1)

Generate a game:

Show the dataset:

Choose the action labels in the plot (hover over the lines of each player disk to view):

GamePlayerLabels  (1)

Generate a game:

Choose the player labels in the plot:

PlotLayout  (1)

Generate a game:

Use the default "BarChart" plot:

Use the "SplitSquare" plot:

Use a list of player index {{r1,…,rk},{c1,…,cn-k}} to group the n players as row players {r1,…,rk} and column players {c1,…,cn-k}:

The player order may be added to the layout style:

PlotLegends  (1)

Generate a game:

Plot it with a legend (default):

Plot it without a legend:

This is particularly useful in the case of the style "SplitSquare":

Plot it without a legend:

Applications  (9)

Recreational Games  (2)

Rock-paper-scissors is a zero-sum game where either one player wins and the other loses or there is a tie. The plot style "SplitSquare" is best for two-player games:

This plot uses gray for the losing player (lowest value), a vibrant blue or orange for the winning player (highest value) and a pale orange or blue for a tie (average value).

Generalize Rock Paper Scissors to Rock Paper Scissors Fire Water by setting up dominance order using a graph:

Show the plot:

Social Games  (1)

The Volunteer's Dilemma describes a situation where each player can either volunteer or defect. If at least one player volunteers, all other players marginally benefit from defecting. If no player volunteers, all players have a very low payoff. Generate a Volunteer's Dilemma game with four players:

The best way to visualize most games of more than two players is using the default "BarChart" style. Plot the game:

However, in the "SplitSquare" style, it is not clear what happens to players based on their choices:

A better visualization can be given by isolating a player:

The difference between volunteering and defecting is marginal, except where all players defect.

Prisoner's Dilemma  (2)

Consider a Prisoner's Dilemma game:

Show the dataset:

Consider that each player has a dominating strategy: to defect.

Naturally, the intersection of dominating strategies is a Nash equilibrium:

Show this strategy visually:

Consider an Optional Prisoner's Dilemma game:

Visualize the game:

Attempt to find the Nash equilibria:

As indicated, the number of solutions is infinite, thus requiring further analysis:

The player strategy {0,0,1} is not a dominating strategy, as one may verify:

However, the strategy {{0,0,1},{0,0,1}} is a Nash equilibrium:

Economics Games  (3)

Three hungry men go to the restaurant and decide to split the bill evenly before ordering. There are three meal options, Cheap, Mediocre and Expensive. Represent this situation as a MatrixGame:

Plot the game:

Find the Nash equilibrium:

The Cournot Oligopoly game describes a situation where a group of firms produces the same good. Each firm must consider the production cost and the quantity the other firms are producing. Only the firms with the lowest price sell goods.

Generate a Cournot Oligopoly game:

Find the optimal game strategies in this game:

This is intuitive when considering for all players, the payoffs are largest for the second action:

A price war refers a game where multiple firms have an interest in offering the lowest price, but the payoff of any firm is directly correlated to the price chosen. Consider a price war among three firms, where each firm has the choice between a low price and a high price:

Visualize the game:

Despite the common interest of having the price as high as possible, competition creates a Nash equilibrium at the low price:

Symmetry in Games  (1)

An easy way to visualize the symmetry or differences between player payoffs is to plot them using different row and column players. For example, consider the difference between pure coordination and dangerous coordination games. In the former, players have the same payoffs:

If a game is symmetric over players, then any permutation that maintains the shape of the plot should show equivalent payoffs:

Neat Examples  (1)

Consider a large Matrix Game with six players having three actions each:

See Also

MatrixGame  TreeGamePlot  FindMatrixGameStrategies

Related Guides

    ▪
  • Game Theory

History

Introduced in 2025 (14.2)

Wolfram Research (2025), MatrixGamePlot, Wolfram Language function, https://reference.wolfram.com/language/ref/MatrixGamePlot.html.

Text

Wolfram Research (2025), MatrixGamePlot, Wolfram Language function, https://reference.wolfram.com/language/ref/MatrixGamePlot.html.

CMS

Wolfram Language. 2025. "MatrixGamePlot." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MatrixGamePlot.html.

APA

Wolfram Language. (2025). MatrixGamePlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MatrixGamePlot.html

BibTeX

@misc{reference.wolfram_2025_matrixgameplot, author="Wolfram Research", title="{MatrixGamePlot}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/MatrixGamePlot.html}", note=[Accessed: 04-February-2026]}

BibLaTeX

@online{reference.wolfram_2025_matrixgameplot, organization={Wolfram Research}, title={MatrixGamePlot}, year={2025}, url={https://reference.wolfram.com/language/ref/MatrixGamePlot.html}, note=[Accessed: 04-February-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English