Unanswered
			
			
 
			
	
		
			
		
		
		
		
	
			
		
		Hi, I Am Trying To Upload A Plot To An Existing Task Using The
Okay, my bad, the code snippet I sent is correctly uploading it to 'Plots' but in the actual script I use this:
` def plot_graphs(input_df,output_df,task):
# Plotting all the graphs
for metric in df_cols:
    # Assigning X and Y axes data
    in_x = input_df["frameNum"]
    in_y = input_df[metric]
    out_x = output_df["frameNum"]
    out_y = output_df[metric]
    # Creating a new figure
    plt.figure()
    plt.xlabel('Frame Number')
    plt.ylabel('{} Score'.format(metric))
    # Plotting a simple line graph
    plt.plot(in_x,in_y)
    plt.plot(out_x,out_y)
    # Adding legend
    plt.legend(["Input {}".format(metric),"Output {}".format(metric)])
    # Reporting the plot through Trains Logger API
    task.get_logger().report_matplotlib_figure('Input vs Output {}'.format(metric),'Test',iteration=3,figure=plt,report_image=False)
    # task.logger.flush()
    time.sleep(3.0) `This is the code I'm using, not much different from the snippet. I've used plt.figure() to create a new plot since it's in the for loop, could that be causing this?
		279 Views
				0
Answers
				
					 
	4 years ago
				
					
						 
	2 years ago