Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am drawing a state transition diagram using LibreOffice draw on Ubuntu 11.04. I am able to get almost everything that I needed except the final state. Typically we use two circles embedded in for showing a final state of a state transition diagram. Could someone help me to do that? Please also let me know if there are any better tools for drawing state transition diagrams on Ubuntu. I have looked at Dia, but it is not also useful to draw final state of a state transition diagram like in this.

share|improve this question
You might also want to check out LaTeX' very versatile TikZ package: and…. I was also able to find a package in the official repositories that seems to be able to generate STDs. – Glutanimate May 2 '13 at 10:22
up vote 3 down vote accepted

Actually Dia does allow you to add an end state. Select the UML shapes, then drag the "initial/end state" shape onto your diagram. When you double click the shape, you'll see a button that says "Is final". This lets you define whether the state is initial or final.

EDIT: If you don't like how those look, it's pretty easy to create your own shapes in Dia. They're just SVG files.

Save the following as ~/.dia/shapes/fsm_final_state.shape :

<?xml version="1.0"?>

<shape xmlns=""
  <name>Finite State Machine - Final State</name>
    <point x="0.0" y="2.5" />
    <point x="2.5" y="5.0" />
    <point x="5.0" y="2.5" />
    <point x="2.5" y="0.0" />
  <textbox x1="0.0" y1="0.0" x2="5.0" y2="5.0" />
  <svg:svg width="5.0" height="5.0">
    <svg:circle style="fill: default;" cx="2.5" cy="2.5" r="2.5" />
  <svg:svg width="4.0" height="4.0">
    <svg:circle style="fill: default;" cx="2.5" cy="2.5" r="2.0" />

Save the following as ~/.dia/shapes/fsm_final_state_icon.xpm :

/* XPM */
static char * fsm_final_state_icon_xpm[] = {
"16 16 14 1",
"   c None",
".  c #FFFFFF",
"+  c #FCFCFC",
"@  c #B6B6B6",
"#  c #545454",
"$  c #000000",
"%  c #101010",
"&  c #D8D8D8",
"*  c #121212",
"=  c #353535",
"-  c #A0A0A0",
";  c #EBEBEB",
">  c #040404",
",  c #9E9E9E",

Finally, save the following as ~/.dia/sheets/Finite_State_Machine.sheet :

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<sheet xmlns="">
<!--File: ~/.dia/sheets/Finite_State_Machine.sheet-->

<name>Finite State Machine</name>
<description>Finite state machine diagrams</description>
<!--add shapes here-->
<object name="Finite State Machine - Final State">


When you restart Dia you should have a "Finite State Machine" sheet with one shape: a decent looking final state!

share|improve this answer
Thank you. However, it seems that initial and final states are not looking as good as Please let me know if you know any other better tools. – samarasa Oct 9 '11 at 0:53
Edited my answer with an example of how to make your own shapes in Dia. ;-) – erturne Oct 9 '11 at 1:18

I suggest you to use inkscape Install inkscape to produce graphics like that, it takes a little time to learn how to use the tools but is perfectly awarded with the graphic quality of the product.

share|improve this answer

I suggest you to use Dia software for your state diagram or any other UML or flow diagrams. It contains numbers of shapes and easy drag drop facilities. So go for dia. For more information visit this link.

share|improve this answer

Lucidchart is a good option. Free version available and works in any decent browser. I know that there dev team are all running Linux so there is that as well because I work there :)

share|improve this answer

protected by Community Jul 10 '15 at 8:22

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.