# Shrinkable dashed and dotted lines?

**URL:** <https://forum.graphviz.org/t/shrinkable-dashed-and-dotted-lines/789>\
**Category:** Help\
**Created:** [August 28, 2021, 11:04pm UTC](https://forum.graphviz.org/t/shrinkable-dashed-and-dotted-lines/789 "2021-08-28T23:04:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirkh](https://avatars.discourse-cdn.com/v4/letter/k/71c47a/32.png) [@kirkh](https://forum.graphviz.org/u/kirkh)\
**Post date:** [August 28, 2021, 11:04pm UTC](https://forum.graphviz.org/t/shrinkable-dashed-and-dotted-lines/789/1 "2021-08-28T23:04:08Z")

</div>

I want distinct dashed and dotted lines, because of a particular diagramming standard. The graph will be shrunk for publication to something like 1/3 - 1/2 its size. After such shrinking it’s far from clear that the dashed lines are dashed and the dotted lines are dotted:

![image](https://global.discourse-cdn.com/graphviz/original/1X/10a07d579fe43d455b33a2433c8d1d7e89cce368.png)

Is there a way to preserve a line’s dash/dot style under shrinkage? (I’ve experimented a fair bit with penwidth without success so far.)

digraph {  
rankdir=LR ranksep=8 node [fontname=“Arial Black”]  
A  
B  
A-\>B [style=dotted]  
A-\>B [style=dashed]  
}

---

<div class="post-metadata">

**Author:** ![steveroush](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@steveroush](https://forum.graphviz.org/u/steveroush)\
**Post date:** [August 28, 2021, 11:59pm UTC](https://forum.graphviz.org/t/shrinkable-dashed-and-dotted-lines/789/2 "2021-08-28T23:59:44Z")

</div>

The Graphviz language does not have this feature, but you might try using the **size** attribute to “pre-shrink” your output and see if that helps.  
If SVG is an acceptable output format, you can edit the SVG file, looking for **stroke-dasharray** ([Painting: Filling, Stroking and Marker Symbols – SVG 1.1 (Second Edition)](https://www.w3.org/TR/SVG11/painting.html#StrokeProperties)).
