Welcome to TalkGraphics.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2012
    Posts
    4

    Default Maintain equal perpendicular width between two curves? For Sankey Diagrams...

    I want to be able to create a curved 4-sided polygon with equal perpendicular widths, like a thick bezier curve:

    Click image for larger version. 

Name:	line_equal_widths.png 
Views:	384 
Size:	10.4 KB 
ID:	93569

    ... but I want to do that with a shape, adding the curves, one at a time.

    So, say I have "Curve 1". I want to create "curve 2" such that along any point on either curve, the perpendicular distance between the nearest point is equal.

    You can't just copy and paste the same curve at a 45 degree angle, it bulges in the middle, like so:

    Click image for larger version. 

Name:	curve_bulge.jpg 
Views:	322 
Size:	19.9 KB 
ID:	93570


    The reason I want to do this is to create what is called a "sankey diagram", which shows quantitative flows, like the following image:

    Click image for larger version. 

Name:	sankey_sample.jpg 
Views:	368 
Size:	15.4 KB 
ID:	93571

    I want to be able to do a really nice one, like so:
    http://www.wri.org/image/view/11147/_original

    There is a decent sankey tutorial I found using the stacked column graph tool, but it doesn't seem to use curved lines.
    http://www.nelsonelson.com/wiki/inde...ankey_Tutorial

    Of course, I could approximate things by using bezier curves, but I can be much more exact by using separate curves.

    Any help will be very greatly appreciated :)
    IP

  2. #2
    Join Date
    Jun 2002
    Location
    Dunoon, Scotland
    Posts
    4,778

    Default Re: Maintain equal perpendicular width between two curves? For Sankey Diagrams...

    It's not really a well formed tut. but my interpretation of it would be the following. Take your data from Excel or what ever you use and save it as a *.txt or *.csv formated files and also have a quick look in the Adobe site for better instructions: http://www.adobe.com/designcenter-ar...2at_chart.html

    I don't know whether you would be looking at Stacked Column Graph but I would at least go with a column one and when you are happy with the overall look then ungroup. Please mind this will remove the link to your data, then as you want your graph to move from left to right instead of being vertical to a quick transform. Then arrange your blocks to where you want them and link your blocks with a suitable stroke width using the trusty Pen Tool to complete your Sankey diagram. You really need to use the Pen Tool to get decent curves which if you want later you can change to shapes.
    I am sure you did research on this before choosing Illy but what about doing it in Excel? as there is a VB script to do it: http://ramblings.mcpher.com/Home/excelquirks/d3/sankey
    Design is thinking made visual.
    IP

  3. #3
    Join Date
    Dec 2012
    Posts
    4

    Default Re: Maintain equal perpendicular width between two curves? For Sankey Diagrams...

    Wow, the visuals on his site of the guy who made that script are amazing (http://bost.ocks.org/mike/).

    That looks great, I may go with that in part. I would want to somehow integrate with Illustrator probably, because I'm making an infographic with visuals surrounding the diagrams.
    Also, it would be nice to be able to manipulate how things flow, like if I wanted to have the curves move all the way around the infographic, from one end to the other, zig-zagging or even looping.

    How can I convert a thick pen tool into a shape?

    As far as using the pen tool is concerned, the thing is, the pen tool can only approximate things as I expand the thickness, and I would like it to be exact, so that I use the stacks and connect the ends of two curves to the corners of each stack, and I can furthermore manipulate the curves as I wish. Does this make sense?

    Thanks for your help!
    IP

  4. #4
    Join Date
    Jun 2002
    Location
    Dunoon, Scotland
    Posts
    4,778

    Default Re: Maintain equal perpendicular width between two curves? For Sankey Diagrams...

    To answer your first question: Under the Object menu, click on Expand, then make sure Stroke is selected.
    I am no expert on Sankey diagrams but I would have thought if you took your lowest value as 1pt stroke or whatever size stroke you wanted start with and then proportionally increased the size to your highest value.
    The question about the connection between one stack and another. Please remember again, I am no expert here on Sankey. I would have thought it would be the horizontal length (left to right) to be important and not the curves. You use the curves to be aesthetically pleasing and to join one area with another, to show the flow.
    Also the Pen Tool can have highly accurate curves if you use Smart Guides + Grid. The grid also can be set to your graph units by setting it through the Edit window and then down to Preferences - Guides & Grid.
    Design is thinking made visual.
    IP

  5. #5
    Join Date
    Dec 2012
    Posts
    4

    Default Re: Maintain equal perpendicular width between two curves? For Sankey Diagrams...

    Oh wow, yeah. I guess that can all work the same. I didn't realize you can snap to the grid, and that you can specify the grid size and can change the stroke size to any fraction. So you're right, I have total control with only using lines. No use in using excel, though that would be good for doing it on the fly.

    Actually, the length from one end to the other does not matter. The only thing that matters is the thickness of the curve, that's what a sankey is. It's like a bar graph, where the thickness of the bar is represents the value... but with Sankey, there are curves connecting bar graphs. You don't know if one can be an "expert" on sankey diagrams, what you see is all they are
    If you're talking about aesthetics with sankeys, that's always a different issue with everything.

    Sankeys are the best way to visualize information, and it will catch on eventually. Hopefully something like that tool would be integrated into excel and other programs.
    This is still the best sankey I've seen.
    Though it might look like 3 bar graphs connected, it's actually more like showing 30 bar/pie charts at once. If you wanted to for example show "what energy source goes into Iron & Steel", you'd have to show that as a separate bar/pie.
    Pay attention to the thickness of the lines, they don't change, as the values don't change between 2 ends.

    Look at the following, and pay a
    http://www.wri.org/image/view/11147/_original

    I make videos about how to do this stuff, so eventually I'll do it and post it here

    And by the way, I posted the same question here, and got some interesting responses, especially with a nice image at the end with the grid and a tool you can add to illustrator called "connect"... though I'm not sure if that will be useful:
    http://forums.creativecow.net/thread/245/862852#862861
    "Connect": http://www.astutegraphics.com/products/subscribe

    Thanks for your help, you and the guy above solved the problem L
    IP

  6. #6
    Join Date
    Dec 2012
    Posts
    4

    Default Re: Maintain equal perpendicular width between two curves? For Sankey Diagrams...

    Quote Originally Posted by nittyjee View Post
    I didn't realize you can snap to the grid, and that you can specify the grid size and can change the stroke size to any fraction. So you're right, I have total control with only using lines. No use in using excel, though that would be good for doing it on the fly.
    ... i guess that's what's beatiful about vectors. Sometimes I forget that the size doesn't matter, only the relative size.
    IP

 

 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •