## Re: [Matplotlib-users] Ternary Plotting using Matplotlib

 Re: [Matplotlib-users] Ternary Plotting using Matplotlib From: Chloe Lewis - 2010-09-15 17:04:40 ```Lab Rat, Ben; Yes, you could use the ternary code I've put together to do the CAC plots in 2D; defining a complete triangular grid and triangular patches would be easy. If I'm reading the examples correctly, all the third-dimension information duplicates the color information. They're simpler than they look, Ben, which is part of their charm; we use them for any mixture of three elements where a+b+c is constant, so really they're 2D data. (Why bother, people ask? Because which of the elements is most interesting varies with the mixture and use, so we like having all three axes labeled. Note: many versions get one of the axes backwards.) &C On Sep 15, 2010, at 8:38 AM, Uri Laserson wrote: > I believe that Chloe Lewis may have posted about this before. She > has code for doing some ternary plotting type stuff that may be a > good place to start for you: > http://nature.berkeley.edu/~chlewis/Sourcecode.html > > Uri > > On Wed, Sep 15, 2010 at 11:23, Benjamin Root wrote: > On Tue, Sep 14, 2010 at 10:37 AM, Lab Rat wrote: > I saw some 3d ternary plots on the URL: http://www.hca.com/index.php?id=76&L=0 > that I'd love to recreate using matplotlib. Can anyone give me > some general code examples of where I should likely begin? > Thanks in advance! > Wil > > > Ah, my wife showed me these plots once. odd little buggers... > > As far as I know, these plots are not available in matplotlib at the > moment. However, I might be persuaded to write up some code to do a > 2D version of it (3D version would come much, much later). If I > could get this to work, I might finally convince my wife to switch > from matlab/excel to python! > > Do you have any resources that explains how these graphs work? > > Thanks, > Ben Root ```

 [Matplotlib-users] Ternary Plotting using Matplotlib From: Lab Rat - 2010-09-14 15:37:30 Attachments: Message as HTML ```I saw some 3d ternary plots on the URL: http://www.hca.com/index.php?id=76&L=0 that I'd love to recreate using matplotlib. Can anyone give me some general code examples of where I should likely begin? Thanks in advance! Wil ```
 Re: [Matplotlib-users] Ternary Plotting using Matplotlib From: Benjamin Root - 2010-09-15 15:26:24 Attachments: Message as HTML ```On Tue, Sep 14, 2010 at 10:37 AM, Lab Rat wrote: > I saw some 3d ternary plots on the URL: > http://www.hca.com/index.php?id=76&L=0 that I'd love to recreate using > matplotlib. Can anyone give me some general code examples of where I should > likely begin? > Thanks in advance! > Wil > > Ah, my wife showed me these plots once. odd little buggers... As far as I know, these plots are not available in matplotlib at the moment. However, I might be persuaded to write up some code to do a 2D version of it (3D version would come much, much later). If I could get this to work, I might finally convince my wife to switch from matlab/excel to python! Do you have any resources that explains how these graphs work? Thanks, Ben Root ```
 Re: [Matplotlib-users] Ternary Plotting using Matplotlib From: Uri Laserson - 2010-09-15 15:39:10 Attachments: Message as HTML ```I believe that Chloe Lewis may have posted about this before. She has code for doing some ternary plotting type stuff that may be a good place to start for you: http://nature.berkeley.edu/~chlewis/Sourcecode.html Uri On Wed, Sep 15, 2010 at 11:23, Benjamin Root wrote: > On Tue, Sep 14, 2010 at 10:37 AM, Lab Rat wrote: > >> I saw some 3d ternary plots on the URL: >> http://www.hca.com/index.php?id=76&L=0 that I'd love to recreate using >> matplotlib. Can anyone give me some general code examples of where I should >> likely begin? >> Thanks in advance! >> Wil >> >> > Ah, my wife showed me these plots once. odd little buggers... > > As far as I know, these plots are not available in matplotlib at the > moment. However, I might be persuaded to write up some code to do a 2D > version of it (3D version would come much, much later). If I could get this > to work, I might finally convince my wife to switch from matlab/excel to > python! > > Do you have any resources that explains how these graphs work? > > Thanks, > Ben Root > > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Uri Laserson Graduate Student, Biomedical Engineering Harvard-MIT Division of Health Sciences and Technology M +1 917 742 8019 laserson@... ```
 Re: [Matplotlib-users] Ternary Plotting using Matplotlib From: Chloe Lewis - 2010-09-15 17:04:40 ```Lab Rat, Ben; Yes, you could use the ternary code I've put together to do the CAC plots in 2D; defining a complete triangular grid and triangular patches would be easy. If I'm reading the examples correctly, all the third-dimension information duplicates the color information. They're simpler than they look, Ben, which is part of their charm; we use them for any mixture of three elements where a+b+c is constant, so really they're 2D data. (Why bother, people ask? Because which of the elements is most interesting varies with the mixture and use, so we like having all three axes labeled. Note: many versions get one of the axes backwards.) &C On Sep 15, 2010, at 8:38 AM, Uri Laserson wrote: > I believe that Chloe Lewis may have posted about this before. She > has code for doing some ternary plotting type stuff that may be a > good place to start for you: > http://nature.berkeley.edu/~chlewis/Sourcecode.html > > Uri > > On Wed, Sep 15, 2010 at 11:23, Benjamin Root wrote: > On Tue, Sep 14, 2010 at 10:37 AM, Lab Rat wrote: > I saw some 3d ternary plots on the URL: http://www.hca.com/index.php?id=76&L=0 > that I'd love to recreate using matplotlib. Can anyone give me > some general code examples of where I should likely begin? > Thanks in advance! > Wil > > > Ah, my wife showed me these plots once. odd little buggers... > > As far as I know, these plots are not available in matplotlib at the > moment. However, I might be persuaded to write up some code to do a > 2D version of it (3D version would come much, much later). If I > could get this to work, I might finally convince my wife to switch > from matlab/excel to python! > > Do you have any resources that explains how these graphs work? > > Thanks, > Ben Root ```
 Re: [Matplotlib-users] Ternary Plotting using Matplotlib From: Benjamin Root - 2010-09-16 17:19:44 Attachments: Message as HTML ```On Wed, Sep 15, 2010 at 12:04 PM, Chloe Lewis wrote: > Lab Rat, Ben; > > Yes, you could use the ternary code I've put together to do the CAC plots > in 2D; defining a complete triangular grid and triangular patches would be > easy. > > If I'm reading the examples correctly, all the third-dimension information > duplicates the color information. > > They're simpler than they look, Ben, which is part of their charm; we use > them for any mixture of three elements where a+b+c is constant, so really > they're 2D data. (Why bother, people ask? Because which of the elements is > most interesting varies with the mixture and use, so we like having all > three axes labeled. Note: many versions get one of the axes backwards.) > > &C > > Chloe, For right now, I think we will just leave it to people utilizing your code as is for right now. Eventually, I would like to see about creating a proper projection and axes object to provide general functionality, but I will not be able to work on that for about a month. Ben Root ```
 Re: [Matplotlib-users] Ternary Plotting using Matplotlib From: Kevin Davies - 2011-05-28 03:09:58 ```I was looking for some ternary plots too. I started with Chloe's code and got it running (thanks!). I'd like to be able to plot trajectories of chemical composition over time from a simulation. I saw that it would be difficult to plot many points to make a curve using the existing code. Chloe noted that it might be good to use matplotlib's projection classes and methods. I took a stab at it, but I'm stuck and out of time for now. I made some progress (code and image attached). However, it has problems that would have to be fixed to create serious plots for publications and whatnot. Anyways, here it is... I hope someone with more experience with matplotlib might know what to do. I've noted the issues in the code. Thanks, Kevin http://old.nabble.com/file/p31721702/ternary.png ternary.png http://old.nabble.com/file/p31721702/ternary.py ternary.py -- View this message in context: http://old.nabble.com/Ternary-Plotting-using-Matplotlib-tp29710153p31721702.html Sent from the matplotlib - users mailing list archive at Nabble.com. ```