Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hi, I Have A Plt Plot That Is Being Automatically Uploaded To A Task And Is Presented In The Plots Section Of The Task As Expected. However, The Plot Itself Isn'T Presented Fully, And I Can Only See The Titles And Some Of The Legend, But Not The Lineplot

Hi, I have a plt plot that is being automatically uploaded to a Task and is presented in the Plots section of the task as expected. However, the plot itself isn't presented fully, and I can only see the titles and some of the legend, but not the lineplot itself. Zoom in is not responsive and when I download the plot as png it downloads the same small version without the lineplot.
How can I zoom in to see the entire plot, or download it?

  
  
Posted 2 years ago
Votes Newest

Answers 4


` def plot_facetgrid(df, col, x_axis, y_axis, hue_by):
plt.figure(figsize=(10,8), dpi=100)
with mpl.rc_context({"lines.linewidth": 2, "axes.titlesize": 16, "axes.labelsize": 16,
"xtick.labelsize": 16, "ytick.labelsize": 16, "legend.fontsize": 16}):
n_sample = 8
grid = sns.FacetGrid(
df,
margin_titles=True,
col=col,
row=hue_by,
sharex='all',
sharey='row',
# col_wrap=3,
height=3, aspect=1.5,
hue=hue_by,
)

    # Draw a line plot to show the trajectory of each random walk
    grid.map(sns.lineplot, x_axis, y_axis, marker="o")
    grid.map_dataframe(annotate)

    grid.map_dataframe(annotate_values)

    # grid.add_legend()
    grid.set(xticks=list(range(10)))
    grid.set_xticklabels(['(1, 0)'] + [''] * n_sample + ['(0, 1)'])

    grid.fig.subplots_adjust(top=0.85)
    for ax in grid.axes.flat:
        ax.yaxis.set_major_formatter(FormatStrFormatter('%.2f'))

    grid.figure.suptitle(f'Losses during interpolations- {title_add}')
    plt.show()

plot_facetgrid(df, 'type', 'position', 'losses', 'data')

"""
df is a dataframe with the following coloumns:

  • type: str ( 3 options of types)
  • position: int (it is i for i in range(10))
  • losses: float
  • data: str (3 options of data) `
  
  
Posted 2 years ago

Hi CostlyOstrich36 , thank you for replying.
I have a download button on the top right, but it downloaded the not-full version of the plot.. Attached is the downloaded png.
The plot is created by sns.FacetGrid() and plt.show() at the end

  
  
Posted 2 years ago

Hi DistressedKoala73 , if you hover your mouse over the plot there should be a download plot button on the top right of the plot. Also, can you provide a small code snippet to play around with to see if it reproduces?

  
  
Posted 2 years ago

DistressedKoala73 , can you send me a code snippet to try and reproduce the issue please?

  
  
Posted 2 years ago
1K Views
4 Answers
2 years ago
one year ago
Tags