I am using matplotlib and I want to plot a graph in which the negative part of y axis has large numbers while the positive part has smaller values and the positive part is more valuable to show. So I prefer to draw the negative part of y axis in logarithmic scale and positive part in linear(normal) scale. Here I show whole the plot with log scale and this is my code:
plt.plot(time_stamps,objs,'-rD', markevery=markers_on )
markers_on= list(i for i in range(len(upper_bound)))
plt.plot(time_stamps,upper_bound,'-bD', markevery=markers_on )
markers_on= list(i for i in range(len(best_P_list)))
plt.plot(exce_time_list,best_P_list,'-gD', markevery=markers_on)
plt.xlabel("x", fontsize=10)
plt.ylabel("y ", fontsize=10)
plt.yscale('symlog')
plt.show()
How can I show positive part of y axis in linear scale?
CodePudding user response: