I'm writing a program in Julia that creates SVG images. My program generates the figure on the left, and I want the same figure, but with a decreasing stroke, like the one on the right (dont mind the colour):


How can I achieve this effect? Here is the SVG image source code in case it helps:

    height="161.7875" width="97.609375"
    <path d="M38.3,131.8 Q72.25,103.9 70.44,93.44 M70.44,93.44C68.6,83.0 29.0,78.9 27.16,68.44 M27.16,68.44Q25.31,58.0 59.3,30.12"
    <circle cx ="59.3" cy="30.12" r="2"
            stroke= #000000;
            stoke-width: 1;
            fill: #000000;

  • You'll only be able to do this by scripting point creation in whatever language you're using – Zach Saucier Mar 13 '17 at 13:31

Since you don't give details on which technology you use to create your SVG file, it's hard to advice. However, I assume you could need some javascript in order to create some sort of "brush style".
See this interesting example from https://bl.ocks.org/maelp/5913757: stroke

  • Sorry I wasn't clear enough; I'm using Julia to create my SVG files, but I will take a look at that example, thank you so much! – Jennifer Hurtado Mar 14 '17 at 9:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.