Python Forum
Grid Line not appearing at 0
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Grid Line not appearing at 0
#1
Hello all

I have a strange problem when making sub plots.

I have 15 x sub plots in a figure, however all but 1 of the sub plots does not have a 0 on the Y axis as shown in the attachment.

Not sure why that is?

The code i have for that subplot is as follows:-

axes[5].plot((df_raw_data.iloc[start_counter:end_counter,5]),(df_raw_data.iloc[start_counter:end_counter,13]), linewidth = line_weight)
axes[5].set_ylabel("Soil Mostiure", fontsize=5, weight="bold")
axes[5].set_yticks(range(-15, 16, 10))
Also if i wanted to make the only make a single horizontal grid line a different color then how can i achieve this?

I want to place a gridline at 0 (hence the question above) but i want that grid line to be Green and all the other grid lines to be the default grey color.

I thought about using axhline command??

Can you help?

Thank you.

Attached Files

Thumbnail(s)
   
Reply
#2
I'm guessing that there's no 0 because of the uneven distribution.
what happens if statement 3 is changed to: axes[5].set_yticks(range(-15, 15, 10)) ?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Graph is not appearing in correct frame? garynewport 2 1,036 Jan-11-2023, 11:55 AM
Last Post: garynewport
  Window Not Appearing MGallo 14 7,946 Sep-30-2017, 07:52 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020