[Matplotlib-users] Transferring an Axes Subplot to a projection on a 3d plot
Hi, Sorry for all of these left-field questions. We are trying to develop some custom functionality for a spectroscopy program... Given a 3d surface plot, matplotlib makes it easy to add contours along the projections of the plot. http://matplotlib.org/1.3.1/mpl_toolkits/mplot3d/tutorial.html#d-plots-in-3d We were wondering if it was possible to add other things to the projections instead of contours? For example, imagine I have a standard x vs. y plot already created in a separate Axes object. Would it be possible to transfer the data from the x vs. y plot directly onto the projection of the 3d plot? We've found that sometimes it's useful to put projections on our 3d plots that aren't necessarily reflecting the 3d-dataset per-se. It would be nice if a user could generate plots 2d plots separately, and add them as projections later. I know this is a pretty special use case, so if nothing obvious comes to mind, no problem. Thanks -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Transferring an Axes Subplot to a projection on a 3d plot
Not at this time, no. There are two reasons for this. First, an Artist object can only be attached to a single Axes object at any given time. Right now, it isn't really possible to transfer an Artist from one Axes to another (not impossible, but it certainly isn't a built-in mechanism). The other problem is in the design of mplot3d. It almost completely bypasses the transforms system and uses duck-punching (trademark pending...) to get things working. I have a private branch at home where I am working on augmenting the transforms system to accept 3d projections and simple 3d transforms, but I haven't managed to get it working and I haven't any time for the next few months to work on it any further. The hope is that once I have that in place, I can reimplement mplot3d to use first-class Artists and Axes without any duck-punching. The removal of duck-punching would make what you want to do more possible (not easy, but feasible). But that is probably not for another year unfortunately. My suggestion is to simply extract the relevant data from each artist and create brand new artists on the fly in the 3d axes instead. Depending on the complexity of the plot, it might require some tree-traversal, but if you already have a list of all of the relevant plot elements, then that should be fairly simple. I hope this helps. Sorry for the negatory on simple transfers. Cheers! Ben Root On Wed, Sep 24, 2014 at 12:59 PM, Adam Hughes hughesada...@gmail.com wrote: Hi, Sorry for all of these left-field questions. We are trying to develop some custom functionality for a spectroscopy program... Given a 3d surface plot, matplotlib makes it easy to add contours along the projections of the plot. http://matplotlib.org/1.3.1/mpl_toolkits/mplot3d/tutorial.html#d-plots-in-3d We were wondering if it was possible to add other things to the projections instead of contours? For example, imagine I have a standard x vs. y plot already created in a separate Axes object. Would it be possible to transfer the data from the x vs. y plot directly onto the projection of the 3d plot? We've found that sometimes it's useful to put projections on our 3d plots that aren't necessarily reflecting the 3d-dataset per-se. It would be nice if a user could generate plots 2d plots separately, and add them as projections later. I know this is a pretty special use case, so if nothing obvious comes to mind, no problem. Thanks -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Wireframe colored mesh
Hi, I'm following up on an answered stack overflow thread: http://stackoverflow.com/questions/24909256/how-to-obtain-3d-colored-surface-via-python/26026556#26026556 They show how to create a colormap for a wireframe plot. I noticed that this solution fails when the X and Y data are not the same shape. This inherently comes down to _segments3d being a 3 dimensional array when X, Y are the same dimension, but a 1D array when X,Y are different dimensions. So for example, a set of 10 curves, each with 100 points would have the dimensions: X --- 10 Y --- 100 Z 10 x 100 I've tried hacking on this all day and just can't get a solution to bypass the numpy ravels() and rolls()! Any ideas? Thanks -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Wireframe colored mesh
I always wonder why people go through such lengths to implement such features, but never bother to offer them back into the mainline code or at least suggest such a feature. Think you could make a feature request for this on github? I bet I could figure out how to integrate it into the mesh code without the need for any hacks if I spend a free moment on it. Ben Root On Wed, Sep 24, 2014 at 8:43 PM, Adam Hughes hughesada...@gmail.com wrote: Hi, I'm following up on an answered stack overflow thread: http://stackoverflow.com/questions/24909256/how-to-obtain-3d-colored-surface-via-python/26026556#26026556 They show how to create a colormap for a wireframe plot. I noticed that this solution fails when the X and Y data are not the same shape. This inherently comes down to _segments3d being a 3 dimensional array when X, Y are the same dimension, but a 1D array when X,Y are different dimensions. So for example, a set of 10 curves, each with 100 points would have the dimensions: X --- 10 Y --- 100 Z 10 x 100 I've tried hacking on this all day and just can't get a solution to bypass the numpy ravels() and rolls()! Any ideas? Thanks -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Getting the projection of an axis
Could always ask it its name: import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig, ax = plt.subplots(1, 1, subplot_kw=dict(projection='3d')) ax.name '3d' You can do this with any axes type, such as polar axes and such. Cheers! Ben Root On Tue, Sep 23, 2014 at 3:26 PM, Adam Hughes hughesada...@gmail.com wrote: Hello, Is it possible to inspect an AxesSubplot object and infer if it is using a 3d projection or not? Couldn't figure it out directly from the API. Thanks -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Wireframe colored mesh
https://github.com/matplotlib/matplotlib/issues/3562 On Wed, Sep 24, 2014 at 6:17 PM, Adam Hughes hughesada...@gmail.com wrote: Agreed. I will do so, thanks. If you are able to figure it out, I would be super grateful. I must have spend 5 hours beating my head over this... I'll fill it out tonight. On Wed, Sep 24, 2014 at 9:07 PM, Benjamin Root ben.r...@ou.edu wrote: I always wonder why people go through such lengths to implement such features, but never bother to offer them back into the mainline code or at least suggest such a feature. Think you could make a feature request for this on github? I bet I could figure out how to integrate it into the mesh code without the need for any hacks if I spend a free moment on it. Ben Root On Wed, Sep 24, 2014 at 8:43 PM, Adam Hughes hughesada...@gmail.com wrote: Hi, I'm following up on an answered stack overflow thread: http://stackoverflow.com/questions/24909256/how-to-obtain-3d-colored-surface-via-python/26026556#26026556 They show how to create a colormap for a wireframe plot. I noticed that this solution fails when the X and Y data are not the same shape. This inherently comes down to _segments3d being a 3 dimensional array when X, Y are the same dimension, but a 1D array when X,Y are different dimensions. So for example, a set of 10 curves, each with 100 points would have the dimensions: X --- 10 Y --- 100 Z 10 x 100 I've tried hacking on this all day and just can't get a solution to bypass the numpy ravels() and rolls()! Any ideas? Thanks -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users