Hi Guys. I'm using dagster to replicate some predi...
# ask-community
b
Hi Guys. I'm using dagster to replicate some prediction models, so its generated output graphs correlating my variables. I wonder, I'm using stuff like these: "plt.figure(figsize=(18,16)) sns.heatmap(data.corr(numeric_only = True),annot=True) # plt.show() # Save it into a file plt.savefig('notas_portugues/processed_data/correlacao_dos_dados.png')" How can i plot these images inside the dagster? Anyone has any tip or similar code that I can study to do that? Thanks in advance!
o
hi @Breno Farias da Silva! unfortunately, dagster does not support rendering arbitrary images in the UI. if you're just running locally, then doing something like
Copy code
from dagster import PathMetadataValue
 
...
def my_chart(context, ...):
    ...
    path = 'notas_portugues/processed_data/correlacao_dos_dados.png'
    context.add_output_metadata({"path": PathMetadataValue(f"file://{path}")}
    ...
should at least give you a clickable link to open that file in your browser