3

I created a graphic in the pic language as follows (v-modell.pic):

.PS
AF: box wid 1.6 ht 0.25 "Anforderungen"
SA: box same "Systemarchitektur" at AF.se + (0.1, -0.5)
KA: box same "Komponentenarchitektur" at SA.se + (0.1, -0.5)
MS: box same "Modulspezifikation" at KA.se + (0.1, -0.5)
IM: box same "Implementierung" at MS.se + (0.1, -0.5)
UT: box same "Unittests" at IM.ne + (0.1, 0.5)
IT: box same "Integrationstests" at UT.ne + (0.1, 0.5)
ST: box same "Systemtests" at IT.ne + (0.1, 0.5)
AT: box same "Abnahmetests" at ST.ne + (0.1, 0.5)

arrow from AF.s to SA.n - (0.25, 0) ->
arrow from SA.s to KA.n - (0.25, 0) ->
arrow from KA.s to MS.n - (0.25, 0) ->
arrow from MS.s to IM.n - (0.25, 0) ->
arrow from IM.n + (0.25, 0) to UT.s ->
arrow from UT.n + (0.25, 0) to IT.s ->
arrow from IT.n + (0.25, 0) to ST.s ->
arrow from ST.n + (0.25, 0) to AT.s ->

arrow dotted "validiert durch" above from AF.e to AT.w ->
arrow dotted from SA.e to ST.w ->
arrow dotted from KA.e to IT.w ->
arrow dotted from MS.e to UT.w ->
.PE

Running Arch Linux, I generate the output thereof as follows:

$ pic v-modell.pic | pic2graph -colorspace RGB -density 150 -format png >v-modell.png

The result: the graphic is cut off at the right hand side:

output of pic/pic2graph, cropped at the right-hand side

Is there a way to increase the width of the canvas?

3
  • 1
    One option is to use scale in the .pic file. I.e. after the .PS line say scale=1.2
    – ibuprofen
    Commented Aug 21, 2021 at 22:12
  • @ibuprofen looks promising, but also requires up-scaling the existing boxes with much text in it. So I'd have to re-work the entire graphic. But it's certainly worth considering next time when I'm still working on the graphic! Commented Aug 22, 2021 at 10:47
  • Yes. It's not ideal either. One should hope setting maxpswid to a higher value would work, but looks like there is a limit. At least here setting lower values "works" but not higher.
    – ibuprofen
    Commented Aug 22, 2021 at 16:29

1 Answer 1

2

I found a solution. Instead of using pic2graph, I use groff and set a bigger page size. Then I need ps2eps, of which the output can be processed by ImageMagick's convert:

pic <v-modell.pic | groff -Tps -P-pa3 | ps2eps | convert -colorspace RGB -density 150 -format PNG - v-modell.png

Not ideal, but works:

the final working output

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .