Sg Diagrams

1 view
Skip to first unread message

Brayan Jacobsen

unread,
Aug 4, 2024, 10:56:19 PM8/4/24
to pietradadglob
Thepackage also comes with flags to enable sixdifferent backends.A Haskell-native SVGbackend (the diagrams-svg package)can be selected with -fsvg. Thisflag is enabled by default, so if you do notwant the SVG backend, you must explicitlydisable it with -f-svg. The SVG backend does notyet quite support all the features of the cairobackend: text alignment and embedded images arethe two main missing features at this point, andof course it can only produce SVG images. It is,however, much easier to install, so it is theout-of-the-box default.

There is also a cairo backend (thediagrams-cairo package) which can be selectedwith the -fcairo flag. It is fully-featured andcan produce PNG, PS, PDF, SVG, or animatedGIF output; however,due to its dependencies it can be difficult toinstall on some platforms (notably OS X).


There is a Rasterific backend which isalso Haskell-native (the diagrams-rasterificpackage) which can be selected with the -frasterificflag. This is a fully featured backend with the abilityto produce PNG, JPG, TIFF, BMP and animated GIF output.


This package is just a convenient wrapper around thediagrams-core, diagrams-lib, diagrams-svg, anddiagrams-contrib packages, so they can be installed with a singlecabal install --lib diagrams command.


The package also comes with flags to enable six different backends.The native SVG backend isenabled by the -fsvg flag and is enabled by default. If you don'twant it, you must explicitly disable it with -f-svg.


The cairo backend isdisabled by default but can be selected with the -fcairo flag. Inaddition, the GTK backendis based on the cairo backend (but split into a separate package tomake installing the cairo backend easier). It can be selected withthe fgtk flag.


Issue trackers for all diagrams-related repositories are hosted underthe diagrams organization on github. Ifyou know the specific package containing the bug, report it in theissue tracker specific to that package (for example,diagrams-lib).Otherwise, just report the issue in the issue tracker for thegeneral diagrams repository.


A diagram is a symbolic representation of information using visualization techniques. Diagrams have been used since prehistoric times on walls of caves, but became more prevalent during the Enlightenment.[1] Sometimes, the technique uses a three-dimensional visualization which is then projected onto a two-dimensional surface. The word graph is sometimes used as a synonym for diagram.


In science the term is used in both ways. For example, Anderson (1997) stated more generally: "diagrams are pictorial, yet abstract, representations of information, and maps, line graphs, bar charts, engineering blueprints, and architects' sketches are all examples of diagrams, whereas photographs and video are not".[2] On the other hand, Lowe (1993) defined diagrams as specifically "abstract graphic portrayals of the subject matter they represent".[3]


In the specific sense diagrams and charts contrast with computer graphics, technical illustrations, infographics, maps, and technical drawings, by showing "abstract rather than literal representations of information".[4] The essence of a diagram can be seen as:[4]


Or in Hall's (1996) words "diagrams are simplified figures, caricatures in a way, intended to convey essential meaning".[5] These simplified figures are often based on a set of rules. The basic shape according to White (1984) can be characterized in terms of "elegance, clarity, ease, pattern, simplicity, and validity".[4] Elegance is basically determined by whether or not the diagram is "the simplest and most fitting solution to a problem".[6]


Diagrams help to communicate complex relationships and interconnections between different technical components, and are a great addition to project documentation. Material for MkDocs integrates with Mermaid.js, a very popular and flexible solution for drawing diagrams.


Besides the diagram types listed above, Mermaid.js provides support for pie charts, gantt charts, user journeys, git graphs and requirement diagrams, all of which are not officially supported by Material for MkDocs. Those diagrams should still work as advertised by Mermaid.js, but we don't consider them a good choice, mostly as they don't work well on mobile.


Quarto has native support for embedding Mermaid and Graphviz diagrams. This enables you to create flowcharts, sequence diagrams, state diagrams, gantt charts, and more using a plain text syntax inspired by markdown.


The Graphviz layout programs take descriptions of graphs in a simple text language, and make diagrams in useful formats. Graphviz has many useful features for concrete diagrams, such as options for colors, fonts, tabular node layouts, line styles, hyperlinks, and custom shapes.


You might find it more convenient to edit your diagram in a standalone .dot or .mmd file and then reference it from within your .qmd document. You can do this by adding the file option to a Mermaid or Graphviz cell.


You can disable responsive sizing by specifying the fig-responsive: false option. You can also specify explicit sizes via fig-width and fig-height. For example, here we want to make a mermaid diagram a bit bigger because it contains only a few elements:


Quarto installs headless Chromium via Puppeteer. The bundled Chromium that Puppeteer installs may not work on Docker containers; please check the Puppeteer documentation as well as this article if you are attempting to install within Windows Subsystem for Linux (WSL).


Using mermaid diagrams in Obsidian is currently a bit clunky, and not everything works. Most of these issues can be addressed by allowing the users to resize and realign the mermaid diagram. I think this screenshot can demonstrate my points pretty well:

image16861108 174 KB


The give me link just a link to Resize and align mermaid diagrams - #3 by WhiteNoise where is no solution. And from there you refere to here Gantt charts are way too small to be readable - #6 by brhubbar where you refere as solution back here Resize and align mermaid diagrams - #3 by WhiteNoise.


Lately, when editing diagrams, I have just been using ctrl on Obsidian and using another editor to do the coding. It does make the process visually annoying and less convenient. Also, I tend to sometimes get various rendering artifacts when resizing or updating the code. It also means having to save every time I want the diagrams to update.


As a side note, I am looking forward to some of the mermaid features in beta like the ability to define connections for subgraphs, the new connector shapes, and potentially eventually properly implemented nested subgraphs.


In pursuit of greater specificity, I added [width], [height], and [viewBox] because each mermaid diagram I saw also had width, height, and viewBox attributes:


Recent technological advances have enabled the large-scale adoption of diagrams in a diverse range of areas. Increasingly sophisticated visual representations are emerging and, to enable effective communication, insight is required into how diagrams are used and when they are appropriate for use. The pervasive, everyday use of diagrams for communicating information and ideas serves to illustrate the importance of providing a sound understanding of the role that diagrams can, and do, play. Research in the field of diagrams aims to improve our understanding of the role of diagrams, sketches and other visualisations in communication, computation, cognition, creative thought, and problem solving. These concerns have triggered a surge of interest in the study of diagrams.


The study of diagrammatic communication as a whole must be pursued as an interdisciplinary endeavour. Diagrams attracts a large number of researchers from virtually all related fields, placing the conference as a major international event in the area.


Diagrams is the only conference that provides a united forum for all areas that are concerned with the study of diagrams: for example, architecture, artificial intelligence, cartography, cognitive science, computer science, education, graphic design, history of science, human-computer interaction, linguistics, logic, mathematics, philosophy, psychology, and software modelling.


I am using the LucidChart integration to insert diagrams in Google slides and docs. I have seen especially in Google slides that the resolution of the diagrams are very poor and do not match the resolution in LucidChart. I have looked around and can not find any way to fix this. Has anyone seen this problem? And if so... how did you fix it??


Hi Scott when using our Google add-ons if you resize the diagram to be larger than intended or if your diagram contains a lot of details it may appear blurry upon insertion. If this is the case I recommend exporting your diagram from Lucidchart as a JPEG or PNG and inserting it as an image then it will have better quality. If you don't think your diagram fits those either of those two explanations or you think it's more blurry than expected we'd be happy to take a closer look. Please submit a support ticket here and include a screenshot of the diagram inserted in Slides/Docs and the diagram URL from within Lucdichart. Thanks!


I'm also experiencing this but unfortunately can't post a screenshot as it contains proprietary content. I've tried increasing the size of the content in the diagram (essentially just "diagonally scale up everything and increase font sizes accordingly") but it still gets imported in Slides at the same base window size (about a quarter of the slide area) so when I diagonally scale up the embedded window in Slides the resolution remains low.


I'm generally curious how the LucidChart->Google Slides embedding works - is there an understanding of page size between the two programs? At what dpi is Slides reading content? Basically what quantity or scale can I expect to remain constant during the translation process?


Same issues as above. The work around doesn't really work since the output resolution is capped at 300 dpi. I saw in a feature request you received back in 2016 that this might be increased? Any chance it was implemented?

3a8082e126
Reply all
Reply to author
Forward
0 new messages