-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
figurefirst and matplotlib figure objects #41
Comments
Yea that could work I think.
@jfear - could you put together a short example that you wish would work?
That would be a good starting point I think.
- Floris
…On Tue, Oct 2, 2018 at 11:16 AM Theodore Lindsay ***@***.***> wrote:
Hi @jfear <https://github.com/jfear> glad it helps. I think there might
be a solution using the figure templating function. @florisvb
<https://github.com/florisvb> what do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#41 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPCPPqkqsXmXIOapLc5FvFs4fkhP1CBks5ug62DgaJpZM4XEebR>
.
--
Floris van Breugel
Currently: Moore-Sloan / Sackler Fellow at UW, Seattle, WA
Soon: Assistant Professor of Mechanical Engineering at UNR, Reno, NV
Science: http://www.florisvanbreugel.com
Wildlife and Landscape Photography
Galleries: http://www.ArtInNaturePhotography.com/
Blog: http://www.ArtInNaturePhotography.com/wordpress/
|
Thank you for the quick response. Environment
I would like generate something like this: import numpy as np
import seaborn as sns
dat = np.random.rand(100).reshape(10, 10)
g = sns.clustermap(dat)
g.fig.savefig('clustermap.svg') I would then want to import numpy as np
import matplotlib.pyplot as plt
from figurefirst import FigureLayout
layout = FigureLayout('hello_world_layout.svg')
# some sort of magic like this
layout.add_svg_to_axis('clustermap.svg', 'axis')
layout.insert_figures('target_layer_name')
layout.write_svg('hello_world_output.svg') Other use cases:
Thanks again for taking a look at this, it sounds like a complicated problem to me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FigureFirst looks like a very exciting project, your have identified a major pain point for many people.
I was looking through the documentation, and I was wondering if you had any suggestions for placing a separate mpl.Figure() onto a FigureFirst axis. For example, some of seaborn's more complicated plots (e.g., clustermap, FacetGrid) use gridspec under the hood to build an entire figure. There is no way to pass a mpl.Axes() to the plotting function.
The only possible solution I could think of is: create the seaborn figure, save it as SVG, and then import and add that to the FigureFirst template. Is it possible to import an separate SVG image and add that to a FigureFirst axis? If not it would be a nice feature.
Thanks again for the neat tool, I am going to start playing with it.
The text was updated successfully, but these errors were encountered: