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

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

1 Answer

+1 vote
answered Jan 28, 2016 by plantuml (144,190 points)

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 ?

commented Jan 28, 2016 by sky (130 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.
commented Jan 28, 2016 by plantuml (144,190 points)
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 ?
commented Jan 28, 2016 by sky (130 points)
Sure. That should do it.
commented Jan 29, 2016 by plantuml (144,190 points)
With last beta
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.
commented Jan 29, 2016 by sky (130 points)
I just tried it. That works really great. Thank you.
commented Mar 11, 2016 by sky (130 points)
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.
commented Mar 11, 2016 by sky (130 points)
Version 8037 also seems to have the same problem.
commented Mar 12, 2016 by plantuml (144,190 points)
Cropping maybe related to
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).

commented Mar 15, 2016 by sky (130 points)
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.