Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

Can I not put the title at the bottom in a diagram?

0 votes
I do not see anyway of aligning or styling the diagram title. Am I missing something?
asked Jan 28, 2016 by sky (130 points)

1 Answer

+1 vote

Option are indeed limited with title.

WIth legends, you can have:

legend bottom center
end legend
alice->bob : ok

You can use bottom/top/left/right/center

Would you like to have the same options for titles ?

answered Jan 28, 2016 by plantuml (125,210 points)
Yes. I think we should have a minimum of "Top" and "Bottom" aligned center for the title. The usual paradigm when we are embedding the diagrams in documents or papers is to have a title at the bottom like, "Fig 1.1: The class diagram".  Title positioning options would really help there.
Changing the default dehaviour for "title" is annoying because it will change existing diagrams.
We are thinking about adding a new keyword "caption" that will do the same as title, except that it will be printed at bottom.
Will this be ok for you ?
Sure. That should do it.
With last beta https://dl.dropboxusercontent.com/u/13064071/plantuml.jar
You can have:

skinParam CaptionFontSize 10
skinParam CaptionFontColor blue
class AA
caption This is caption

The default font size is 14 (default for title is 16, but it looks too much for caption). Do you agree ?

Few tests have been done, so feedback is welcome.
I just tried it. That works really great. Thank you.
The beta version you gave me here seems to be restricting the image size I can generate. For a big diagram to get the full image I have to decrease the dpi or the image is cropped. Also, if I use 'newpage' the image gets cropped upto that line. Either is a bug or is being restricted.

 Did the 'caption' keyword available in a release version now? Thank you.
Version 8037 also seems to have the same problem.
Cropping maybe related to http://plantuml.sourceforge.net/qa/?qa=4145/is-the-png-output-size-limited-to-4096-pixels-only
Could you check that ?

About 'newpage', could you provide a non-working example.
We have tested:

caption This is a caption

Bob -> Alice : hello1
Bob -> Alice : hello2
Bob -> Alice : hello3
Bob -> Alice : hello4
Bob -> Alice : hello5
Bob -> Alice : hello6


And this seems to work fine (to us).

I use sublime plugin and tried it with version 8024 and 8037. The following:

a -> b : check
b -> c : verify



a     b     c


a     b     c

Sorry about this ascii image. I don't know how to insert an image into the comments.
Support This Project Offer 250 Mo! Follow PlantUML on Twitter