0

I am using Python 2.7.6 with Ipython 1.2.1 and matplotlib 1.3.1 in Ubuntu 14.04.

In [4]: print(sys.version)
2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2]

In [5]: matplotlib.__version__
Out[5]: '1.3.1'

All of a sudden, without any update to matplotlib or Python, the visualization of the matplotlib plot changed.

The old classical plot of matplotlib looked like this: enter image description here

Now the new plot always seems to look this way:

enter image description here

As you can clearly see, now I am missing axis lines, legend border, errorbar caplines. I am using the same python code and the same interpretor!

Has this happened to anyone, or is there a solution to this?

Srivatsan
  • 9,225
  • 13
  • 58
  • 83
  • That's definitely a bug somewhere ... The new matplotlib still shows the axis spines by default. I know that because I usually remove the top and right one explicitly for better aesthetics :P –  Sep 26 '14 at 13:23
  • Take a look at your `rcparam` and compare it to a default installation to see if you have accidentally changed it. – CT Zhu Sep 26 '14 at 17:10

2 Answers2

0

It was just a small bug with matplotlib.

I found out that because I was using both seaborn (which uses matplotlib to plot graphs) and matplotlib to plot graphs at the same time in the same piece of code, I was getting the error. Once I separated the codes, it was back to normal.

If there is someone who uses both seaborn and matplotlib experience this error, do report!

Srivatsan
  • 9,225
  • 13
  • 58
  • 83
  • Hi, I've noticed that several tag wiki edits you have suggested copy a significant amount of content from an external source. Generic descriptions such as encyclopedia articles and ad copy do not provide useful guidance; try creating something [useful to this community *specifically*](http://blog.stackoverflow.com/2011/03/redesigned-tags-page/), and be sure to attribute the original author. See: [How to reference material written by others](http://stackoverflow.com/help/referencing). Thanks! – Qantas 94 Heavy Oct 28 '14 at 13:24
  • @Qantas94Heavy I was not aware of it. I shall edit some of the tag's which I took from Wikipedia. Is it enough if I mention wikipedia? – Srivatsan Oct 28 '14 at 13:27
  • That is *technically* enough, though I would recommend trying to reword the pages so that they are easier to read and that any unnecessary information for Stack Overflow is removed. – Qantas 94 Heavy Oct 28 '14 at 13:28
-1

There are different backends Matplotlib can use. I could imagine you installed a new driver for your graphic card or whatever and there is a automatic detection in matplotlib like "is opengl available".

However, you are able to change the backend and you could give it a try.

Also read this Stack Overflow thread about list of backends.

Community
  • 1
  • 1
Kuishi
  • 157
  • 4
  • How do you know which one to use? My current backend is `"TkAgg"` – Srivatsan Sep 26 '14 at 13:31
  • Thats a good question. http://matplotlib.org/faq/usage_faq.html#what-is-a-backend gives a small overview with the usage of the backend. I would first just try something different and have a look if it solves the issues. Afterwards I would start thinking about which one fits my needs (do I need vector graphics or something else?). – Kuishi Sep 26 '14 at 13:38