0

Possible Duplicate:
Logarithmic yscale in imshow

In my imshow view, I want the logarithmic scale in the y. the answers like yscale('log') is not my answer. any suggestion please?

Community
  • 1
  • 1
Mojtaba
  • 249
  • 6
  • 14
  • http://stackoverflow.com/questions/13478460/logarithmic-yscale-in-imshow – Mojtaba Nov 23 '12 at 16:46
  • more info in above topic which is already closed – Mojtaba Nov 23 '12 at 16:46
  • When a question is closed, please do not post a new question on the exact same subject. If you want to discuss close reasons, please use the [meta] site instead. This question is now a duplicate of your original question. – Martijn Pieters Nov 23 '12 at 16:48
  • You can edit the old question to make it clear that it is not a duplicate itself, then request it to be reopened. – Martijn Pieters Nov 23 '12 at 16:48
  • Sorry, i did it because they closed the topic even after i described them my question and told them that these answers are not correct. They even didn't listen to me. Can you help me what should i do now? where is MSO? – Mojtaba Nov 23 '12 at 16:50
  • Corrected my comment to link correctly. MSO stands for meta.stackoverflow.com. – Martijn Pieters Nov 23 '12 at 16:51

1 Answers1

2

Do you mean you want the yaxis to be the "log scale" of the data your are plotting in the plot? The difficulty of doing this with imshow() is that the structure in y is fundamentally linear, that is, imshow just shows everything as it's structured in the dataset.

A hack would be to simply copy more data into the plot in such a way that the data reflects a log distribution, so the "lower values" are weighted within the set.

Another track to take would be to try a meshgrid approach, this answer for a different question may help there:

Python matplotlib - formatting with meshgrid for user-defined function

Community
  • 1
  • 1
Dan Steingart
  • 765
  • 1
  • 7
  • 15
  • this is exactly what i thought. I should duplicate the rows exponentially. Thank you for the response. – Mojtaba Nov 23 '12 at 17:18