@@ -569,7 +569,7 @@ def _generate_plot_content(self, plot) -> List[str]:
569569 try :
570570 if plot .plot_type == r .PlotType .STATIC :
571571 plot_content .append (
572- self ._generate_image_content (plot .file_path , width = "95 %" )
572+ self ._generate_image_content (plot .file_path , width = "90 %" )
573573 )
574574 elif plot .plot_type == r .PlotType .PLOTLY :
575575 plot_content .append (self ._generate_plot_code (plot ))
@@ -671,13 +671,13 @@ def _generate_plot_code(self, plot, output_file="") -> str:
671671plot_json_str = json.dumps(plot_json)\n
672672# Create the plotly plot
673673fig_plotly = pio.from_json(plot_json_str)
674- fig_plotly.update_layout(width=950, height=500 )\n """
674+ fig_plotly.update_layout(autosize=False, width=950, height=400, margin=dict(b=50, t=50, l=50, r=50) )\n """
675675 elif plot .plot_type == r .PlotType .ALTAIR :
676676 plot_code += """
677677# Convert JSON to string
678678plot_json_str = json.dumps(plot_json)\n
679679# Create the plotly plot
680- fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=400 )\n """
680+ fig_altair = alt.Chart.from_json(plot_json_str).properties(width=900, height=370 )\n """
681681 elif plot .plot_type == r .PlotType .INTERACTIVE_NETWORK :
682682 # Generate the HTML embedding for interactive networks
683683 if is_url (plot .file_path ) and plot .file_path .endswith (".html" ):
@@ -886,7 +886,7 @@ def _generate_html_content(self, html) -> List[str]:
886886 html_file_path = get_relative_file_path (html .file_path , base_path = ".." )
887887 iframe_code = f"""
888888<div style="text-align: center;">
889- <iframe src="{ html_file_path .as_posix ()} " alt="{ html .title } " width="800px " height="630px "></iframe>
889+ <iframe src="{ html_file_path .as_posix ()} " alt="{ html .title } " width="950px " height="530px "></iframe>
890890</div>\n """
891891 html_content .append (iframe_code )
892892
@@ -902,7 +902,7 @@ def _generate_html_content(self, html) -> List[str]:
902902 return html_content
903903
904904 def _generate_image_content (
905- self , image_path : str , alt_text : str = "" , width : str = "95 %"
905+ self , image_path : str , alt_text : str = "" , width : str = "90 %"
906906 ) -> str :
907907 """
908908 Adds an image to the content list in an HTML format with a specified width and height.
0 commit comments