4
$\begingroup$

Consider the following Graph as an example:

Graph[
    {"Square"->"Rectangle","Rectangle"->"Parallelogram","Parallelogram"->"Four-Sided Polygon","Trapezoid"->"Four-Sided Polygon","Rectangle"->"Trapezoid","Four-Sided Polygon"->"Polygon","Polygon"->"Shape","Circle"->"Ellipsoid","Ellipsoid"->"Shape","Triangle"->"Polygon","Equilateral Triangle"->"Isosceles Triangle","Isosceles Triangle"->"Triangle"},
    PlotTheme->"DiagramGreen",

    VertexSize->{.4,.15},
    VertexLabelStyle->Directive[FontFamily->"Arial",FontSize->14],
    AspectRatio->1.5,
    ImageSize->Large
]

The image is sharp and crisp (or at least bearable) in the local notebook.

enter image description here

But if I publish it to the cloud and look at it there, it is of low quality.

enter image description here

It may not look that bad in this simple diagram but for a more complex diagram with many branches, the vertexes are small and become unreadable and diagonal or curved edges are breaking off (aliasing).

Moreover, the case becomes severe if I am trying to convey information by using a vertex shape function with different types of dotted edges (it becomes difficult to distinguish with the aliasing happening in the cloud):

VertexShapeFunction->(Inset[Framed[#2,
    Background->...change based on #2 ...,
    FrameStyle->Directive[...change based on #2 to {Black,Dotted}, {Black,DotDashed} or {Black,Dashed}...]
],#1]&)

Finally, what happens to the hyperlinks in the vertexes of the Graph in the cloud published notebook, they just don't want to work!

Graph[
    {"Square"->"Rectangle","Rectangle"->"Parallelogram","Parallelogram"->"Four-Sided Polygon","Trapezoid"->"Four-Sided Polygon","Rectangle"->"Trapezoid","Four-Sided Polygon"->"Polygon","Polygon"->"Shape","Circle"->"Ellipsoid","Ellipsoid"->"Shape","Triangle"->"Polygon","Equilateral Triangle"->"Isosceles Triangle","Isosceles Triangle"->"Triangle"}/.{
        "Rectangle"->Hyperlink["Rectangle","https://en.wikipedia.org/wiki/Rectangle"]
    },
    PlotTheme->"DiagramGreen",

    VertexSize->{.4,.15},
    VertexLabelStyle->Directive[FontFamily->"Arial",FontSize->14],
    AspectRatio->1.5,
    ImageSize->Large
]
$\endgroup$
  • $\begingroup$ the problem partly solved see here: mathematica.stackexchange.com/questions/215016/… $\endgroup$ – user13892 Feb 20 at 11:16
  • $\begingroup$ Don’t use cloud publishing, just export to markdown with Kuba’s package and convert to html $\endgroup$ – M.R. Feb 20 at 17:58
  • $\begingroup$ @M.R. can you provide a link to Kuba's package. Does it work with graphs elements and will it be able to convert complex graphs including Epilog to HTML (see the example of graph I drew on the other question)? Also, can I host this generated HTML on the wolfram cloud? Because I don't have a website of my own and was looking to host on wolfram cloud so I can share using the wolfram cloud link. $\endgroup$ – user13892 Feb 20 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.