Skip to content
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

Figures for Surface Current and Coil-Cutting Paper #1307

Draft
wants to merge 31 commits into
base: dp/pyREGCOIL
Choose a base branch
from

Conversation

dpanici
Copy link
Collaborator

@dpanici dpanici commented Oct 17, 2024

Small thing which I think is fine: the torus knots rely on #844 to make the figures, which I note in the script.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@rahulgaur104
Copy link
Collaborator

     plt.figure()
     theta_grid = np.linspace(0, 2 * np.pi, 300)
     zeta_grid = np.linspace(0, 2 * np.pi, 300)
     grid = LinearGrid(rho=1.0, theta=theta_grid, zeta=zeta_grid)
     fig = plot_3d(eq, name="|B|", grid=grid)

     fig.update_traces(
         colorbar=dict(
             tickfont=dict(size=58),  # Adjust the size value as needed
             title_font=dict(size=58),  # Adjust the size value as needed
         )
     )

     fig.update_layout(font=dict(size=18, color="black", family="Arial, sans-serif"))

     config = {
         "toImageButtonOptions": {
             "filename": f"modB_3d_{keyword}_{legend}",
             "format": "svg",
             "scale": scale,
         }
     }

     save_path_html = os.getcwd() + f"/3D_modB/modB_3d_{keyword}_{legend}.html"
     fig.write_html(
         save_path_html, config=config, include_plotlyjs=True, full_html=True
     )

     # save_path_png = os.getcwd() + f"/3D_modB/modB_3d_{keyword}_{legend}.png"
     # fig.write_image(save_path_png, scale=scale)
     plt.close()

Something you can use to increase the font size of the colorbar for the 3D plots and save a svg (high resolution and small file size).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants