-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Adding banded multicolor wires #109
Comments
Cables will probably require a new attribute to specify what style the user wants: multicolor: lengthwise # current look
multicolor: rings # proposed new look Since ethernet cables, for example, are striped lengthwise, whereas DIN 47100 specifies rings. This raises another question, whether the colors should be split 50/50, or whether the second color defines thin rings over a base color? |
Arbitrary ratios are possible. But the yaml might grow very verbose if everything has to be specified. Maybe use 50/50 as starting point and add arbitrary values later if someone needs them? I think for the documentation purpose it might not be so important to exactly match the wire 😄 In the mean time I also encountered 3 color wires, which also should be possible. |
Are there any thoughts on how to actually implement this? I assume we'd lose the outlines on the wires, as I didn't see any way to actually pattern the lines/paths in graphviz. Ideally, this could be done wiht a primary/secondary/(possibly tertiary) color, with the dashed connectors, but that didn't seem to be an attribute that could be specified. Also, as a side note: there are different styles of banding, such as diagonal stripes instead of vertical stripes, though those are usually seen in UTP/STP cables. |
Ideally there would be a way to layout the graph and ask graphviz how long the edges are, than fractions for the coloring could be computed and the graph could be redrawn with colors.
If we can reliably draw multiple edges on top of each other you can draw a wider black edge in the backround and the colors on top like my example, so this would not be an issue.
I don't think, that there are actually diagonal bands. For me it looks more like a twisted stripe. 😝 |
So playing with the table for the wire I got some banded rendering inside the wire node and can match the dimension of the edge with a little bit trial and error. This also got me thinking of possibilities to improve the rendering of the existing multicolor stripe method. (instead of rendering 3 distinct wires for singlecolor to match multicolor width just play around with For the time being I think in this particular case the differences in wire length and resulting band width are still ok. But I can see that mixing very long with very short wires can look ugly. I will start digging into the python scripts the next days to make a test implementation with the existing limitations so that you can try it out. |
How would your striped wires look if you made them the same thickness as the current single-color ones (see example gallery)? I added in a feature that pads single-color wires to match the thickness of the current lengthwise striped ones, but only if there are any multicolor wires present at all, since I find the thinner style more appealing. Could you attach a new render? |
Both styles are in use. Banded coloring may be 50/50 or may be unequal to differentiate "major" versus "minor" colors on each wire. In the 25-pair code, for instance, each wire has a major and minor color, and it is paired with another wire that has the same two colors but flipped in dominance. So it's essential to be able to show the difference, but the precise ratio is not important and can be chosen for visual effect. (Something like 70/30 vs 30/70 is probably adequately distinct, without reducing the minor color's visibility too much. Overly-small pips of color could be problematic on a printer with poor registration.) In my personal experience in telecom, some manufacturers use stripes, some use bands, and anyone reading the diagram should have no trouble mentally translating between the two. But it might be nice to be able to pick the visual style to match the wire in use. There are also 3-band codes in use, for instance ICEA method 5, which is explained quite well here: https://www.buyawg.com/pdf/wire-cable-methods-of-color-coding.pdf In this case, it's again important to differentiate the base (major) color from the tracers. (Look at wires 22 and 23 for instance.) I'm not personally experienced with this code but I've run across it in catalogs, so I don't know if there's a standard for the proportions. [Appended by @kvid 2024-09-16]: It seems the PDF linked above disappeared some time before 2023-12-24, but this archived version from 2018-08-27 might be identical to what @myself248 referred to in 2021. |
@tobiasfalk wrote:
Where steveroush links to: https://gitlab.com/graphviz/graphviz/-/issues/1069#note_1364067228 As far as I can see, up to now, the only suggestion is using |
@kvid Yea, I think this is pretty much on hold until Graphviz implements some more advanced style definition, or someone finds some other way to hack this together with just one edge. |
I have acheaft this with some SVG editing, as with my Idea in #423 one could implement this.
|
Problem with this, it does not follow the path, but bot is consistent in the X axis (left tot right) |
a gradiant alog the path seams not posble, simply because of the limitations of SVG, |
The drawback of In this regard the |
In the first, sticking together or not does not change anything. |
Splitting out from #96 as requested:
I'm looking for a way to produce a banded output for two color wires. #96 introduced two colors by showing the second color as stripe along the wire.
I think with a banded representation it is easier to distinguish the colors and looks more visually appealing.
Here is an example (taken from #96):
I've just play around with the
.gv
files and the dot language.Todo:
style="dashed"
can be used. But I think it's not as visually appealing as the example above.dot - graphviz version 2.44.0 (0)
which might be fixed laterThe text was updated successfully, but these errors were encountered: