I recently upgraded from version 4.4 patchlevel 0 to 5.0 patchlevel 3 (provided by Ubuntu 16.04), and found that I could not longer get keys on my contour plots. The same problem was present with version
4.6 patchlevel 6 also provided by Ubuntu. I had to downgrade back to 4.4 patchlevel 0 from the source
in order to get this functionality back. How is it possible that nobody else has reported such a major bug, I wonder? I attach an example of a file where the problem occurs.
I suspect that you do have a key but it is empty because you used the keyword "notitle" in your command
splot "dipole.dat" using 1:2:3 notitle w lines lt -1 lw 2The "notitle" turns off the key entry. If you want a key entry but don't want the name of the file to appear then provide a blank title:
splot "dipole.dat" using 1:2:3 title " " w lines lt -1 lw 2If the contour labels in the key still do not appear, please attach the data file so that we can try to reproduce it.
Sorry I didn't login before posting this bug before. I am still using my old version of gnuplot (4.4.0), and I can assure you that the code produces a key despite the notitle. So maybe the behavior of the splot command changed in this respect after that version. However I have everything working now and don't want to break it by reinstalling a newer version of gnuplot to test this out.