title: Plotly How to move x-axis to top and y-axis to the right?
body: <p>Is there a way to move the Plotly-plot's xtick labels to &quot;top&quot; of the plot <br>
  and ytick labels to the &quot;right&quot; of the plot?</p>
  <p><a href="https://i.stack.imgur.com/VoLGk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VoLGk.png" alt="enter image description here" /></a></p>
  <p>In the above plot, I basically want to move the xtick labels to top, and ytick labels to the right. I know this is not the prefered way, but i just want to know if this is even possible.</p>
  <p>Here's a sample code, for re-constructing the above plot,</p>
  <pre class="lang-py prettyprint-override"><code>import plotly.graph_objects as go
  
  
  fig = go.Figure()
  
  fig.add_trace(go.Bar(
      x=[&quot;Apples&quot;, &quot;Oranges&quot;, &quot;Watermelon&quot;, &quot;Pears&quot;],
      y=[3, 2, 1, 4]
  ))
  
  fig.update_layout(
      autosize=False,
      width=500,
      height=500,
      yaxis=dict(
          title_text=&quot;Y-axis Title&quot;,
          ticktext=[&quot;Very long label&quot;, &quot;long label&quot;, &quot;3&quot;, &quot;label&quot;],
          tickvals=[1, 2, 3, 4],
          tickmode=&quot;array&quot;,
          titlefont=dict(size=30),
      )
  )
  
  fig.update_yaxes(automargin=True)
  
  fig.show()
  </code></pre>