0

When I wanna plot my data in python, it shows modified values of my y-values instead of original data.

enter image description here

As can be seen in the plot, it subtracts 1.455e2(which is written beside the y axis) from my original data and I wanna show the original data in my plot. Here's my script about the plot:

plt.xlabel("H(Oe)")
plt.ylabel("R*E-3(dBm)")

plt.plot(h_1,r_2,linestyle="-",linewidth=1,label="2.50_GHz")
plt.legend(loc='upper left')
plt.grid(color="k", linestyle=":")
plt.savefig("0_deg_2.50_GHz_R.png", dpi=300,bbox_inches = 'tight')
plt.show()

And actually it does show the original y-values for some other data files, I'm using the exactly same script but for this one it always shows the modified values. Does anyone know how to fix it? Thanks a lot.

2
  • you don't have a plt.plot(h_1, your_modified_values...) above this code, do you? or the modified values in r_2? Commented Mar 17, 2020 at 20:58
  • stackoverflow.com/questions/9303728/… Commented Mar 17, 2020 at 21:02

1 Answer 1

3

This is not scientific notation but is known as an offset (hence the + before the number). The original values can be seen by adding the offset to all of the values.

You can prevent an offset being used as:

plt.ticklabel_format(useOffset=False)
Sign up to request clarification or add additional context in comments.

2 Comments

Yep, this is correct. I thought I saw scientific notation but it is not the case.
It's the e: always makes me immediately think of scientific notation too!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.