Figures Dimensions #24
Replies: 7 comments 3 replies
-
Have you already tried it to see if it works currently? If it doesn't, I'm
not sure what can be done about it. It may be a limitation of `pystata`,
which is what underlies `nbstata`.
…On Thu, May 11, 2023, 3:17 PM Fernando Rios-Avila ***@***.***> wrote:
Hi Tim
I was wondering if there is anyway to modify how nbstata works regarding
figures.
I know that currently, you can change the setup if you would like to
obtain larger or smaller figures to be output in jupyter notebook.
However, would it be possible to use information from "xsize() and
ysize()" to be used to change those settings in a more dynamic way?
Thank you!
—
Reply to this email directly, view it on GitHub
<#24>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB63GLF4W6HVYHAAEG74VNDXFVCO5ANCNFSM6AAAAAAX6TYGKU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi Tim
I tried and it doesn’t work.
It generally produces a figure that is reshaped to fit the default
parameters (6x4 I think?)
I will try it again in a notebook using nbstata and pystata to see if it
works
Thank you!
Fernando
On Fri, May 12, 2023 at 10:29 PM Tim Huegerich ***@***.***>
wrote:
… Have you already tried it to see if it works currently? If it doesn't, I'm
not sure what can be done about it. It may be a limitation of `pystata`,
which is what underlies `nbstata`.
On Thu, May 11, 2023, 3:17 PM Fernando Rios-Avila ***@***.***>
wrote:
> Hi Tim
> I was wondering if there is anyway to modify how nbstata works regarding
> figures.
> I know that currently, you can change the setup if you would like to
> obtain larger or smaller figures to be output in jupyter notebook.
> However, would it be possible to use information from "xsize() and
> ysize()" to be used to change those settings in a more dynamic way?
>
> Thank you!
>
> —
> Reply to this email directly, view it on GitHub
> <#24>, or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AB63GLF4W6HVYHAAEG74VNDXFVCO5ANCNFSM6AAAAAAX6TYGKU
>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#24 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASZKKFVB2773HE4S7IRPBALXF3WYFANCNFSM6AAAAAAX6TYGKU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Just as feedback
I just tried the "size" options.
when using nbstata, figures that are shown on the notebook are unaffected
when using "size" "ysize" options.
However, if I do the same using pystata (with magic commands %%stata),
figures do adjust as needed.
I can send you the notebooks if they are useful
Fernando
On Fri, May 12, 2023 at 10:29 PM Tim Huegerich ***@***.***>
wrote:
… Have you already tried it to see if it works currently? If it doesn't, I'm
not sure what can be done about it. It may be a limitation of `pystata`,
which is what underlies `nbstata`.
On Thu, May 11, 2023, 3:17 PM Fernando Rios-Avila ***@***.***>
wrote:
> Hi Tim
> I was wondering if there is anyway to modify how nbstata works regarding
> figures.
> I know that currently, you can change the setup if you would like to
> obtain larger or smaller figures to be output in jupyter notebook.
> However, would it be possible to use information from "xsize() and
> ysize()" to be used to change those settings in a more dynamic way?
>
> Thank you!
>
> —
> Reply to this email directly, view it on GitHub
> <#24>, or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AB63GLF4W6HVYHAAEG74VNDXFVCO5ANCNFSM6AAAAAAX6TYGKU
>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#24 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASZKKFVB2773HE4S7IRPBALXF3WYFANCNFSM6AAAAAAX6TYGKU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
SUre thing
Here is the minimal example
…On Mon, May 15, 2023 at 12:50 PM Tim Huegerich ***@***.***> wrote:
Hmm, that's a bit surprising. I guess maybe that means there's a
difference between the behavior of %%stata and pystata.stata.run (which
is what nbstata uses under the hood). I am curious to see the notebooks if
they're easy to send.
—
Reply to this email directly, view it on GitHub
<#24 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASZKKFSOYH5BVTFTXXELQJ3XGJNHDANCNFSM6AAAAAAX6TYGKU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Just in case, did you see that you can use the |
Beta Was this translation helpful? Give feedback.
-
Thank you!
I think the attachment got lost because I send it as a reply to github?
What Im ending up doing is quietly (and with output: false) produce the
graphs, export them into other formats (png or pdf)
and then add that figure into my document.
Have become a bit more proficient with QUarto-nbstata but few things are
still hard in regards to tables and referencing.
If I encounter anything else, will let you know
Fernando
…On Tue, Aug 29, 2023 at 4:29 PM Tim Huegerich ***@***.***> wrote:
But nevermind. I've tried it out for myself now and see what you're
saying. It's not a difference between %%stata and pystata.run as I
guessed. Rather it's an undocumented
<http://pystata.config.set_graph_size> side effect of
pystata.config.set_graph_size. If you set graph size to something other
than "default", it stops the xsize/ysize options from impacting. But if you
leave set_graph_size as ("default", "default"), xsize/ysize work (with both
%%stata and pystata.run). As a result, I should probably change the
nbstata treatment of graph_size, leaving the "default"s in place...
—
Reply to this email directly, view it on GitHub
<#24 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASZKKFXB3YC2IVKNFE5JDN3XXZGI7ANCNFSM6AAAAAAX6TYGKU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Ok, there is a workaround (not yet documented) that will make the |
Beta Was this translation helpful? Give feedback.
-
Hi Tim
I was wondering if there is anyway to modify how nbstata works regarding figures.
I know that currently, you can change the setup if you would like to obtain larger or smaller figures to be output in jupyter notebook.
However, would it be possible to use information from "xsize() and ysize()" to be used to change those settings in a more dynamic way?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions