Wolfram Language Fast Introduction for Programmers
Get Started »

Graphics

The Wolfram Language makes it easy to take data of any kind and visualize it:

In[1]:=
X
Out[1]=
In[2]:=
X
Out[2]=

Graphics are an integrated part of the Wolfram Language. To create graphics in Java, you can either write custom code in a GUI library such as Swing or AWT, or use a third-party library such as JFreeChart.

Wolfram Language graphics are displayed inline in the notebook, rather than requiring a separate GUI to display the results.

Python does not have built-in functions that can create graphics on the fly. To simulate these Wolfram Language examples, you typically write your own solution using a GUI library such as Tkinter, or rely on a third-party library such as matplotlib or networkx.

Notice that Wolfram Language graphics are displayed inline in the notebook, rather than requiring a separate GUI to display the results.

Graphics are represented as symbolic expressions, using either directives or styles:

In[3]:=
X
Out[3]=
In[4]:=
X
Out[4]=

QUICK REFERENCE: Graphics and Visualization »

Visualization functions take many options.
PlotTheme gives a way to choose an overall “theme”.

Check Your Understanding

Which one of these makes an orange circle?

ListLinePlot[{Orange, Circle[]}]

Incorrect. ListLinePlot ordinarily takes a list of numbers and does not make generic graphics.

Graphics[Circle[]]

Incorrect. This does not specify a color, and so will make a circle in the default color, which is black.

Graphics[{Orange, Circle[]}]

Correct.

Which one of these was made using the built-in function ListLinePlot?

Incorrect. This plot was made using the built-in function Graph.

Correct.

Incorrect. This plot was made using the built-in function Graphics.

Which one of these does NOT make a green disk?

ListLinePlot[Style[Disk[], Green]]

Correct. ListLinePlot ordinarily takes a list of numbers and does not make generic graphics.

Graphics[{Green, Disk[]}]

Incorrect. Everything that follows Green will be colored.

Graphics[Style[Disk[], Green]]

Incorrect. Style associates the color with the Graphics object.