Move the axis on the graph in R

Asked

Viewed 341 times

1

I need to make some heat charts with a legend bar on the side. I also need to lay the axes. However, as I had to slightly increase the dimension of the chart for the caption bar to appear on the side, the Y axis shifts away from the chart design. As we can see in the picture:

inserir a descrição da imagem aqui

I would like the Y-axis to be very close to the figure, as the X-axis is! I’m using the image() function, is there any input in this function that can move the axis without having to change the window dimensions?

  • 1

    It will be easier to help if you provide your code and a portion of your data as explained here.

  • As Willian said, without you providing your data and the code you are using, it is impossible to reproduce the problem, because in the function examples image, the axes are glued to the graph

  • Take a look at the function image.plot package fields.

  • May I suggest the ggplot2 easy to use and very complete. Tutorial: https://www.rstudio.com/resources/cheatsheets/

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.