mirror of
				https://gitlab.science.ru.nl/mthesis-edeboone/m-thesis-introduction.git
				synced 2025-10-31 03:46:44 +01:00 
			
		
		
		
	Fix projection 3d for old matplotlib versions
This commit is contained in:
		
							parent
							
								
									6e18dca9c2
								
							
						
					
					
						commit
						22a54da1c8
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -10,6 +10,7 @@ in a continuous fashion
 | 
				
			||||||
if __name__ == "__main__":
 | 
					if __name__ == "__main__":
 | 
				
			||||||
    import numpy as np
 | 
					    import numpy as np
 | 
				
			||||||
    import matplotlib.pyplot as plt
 | 
					    import matplotlib.pyplot as plt
 | 
				
			||||||
 | 
					    from mpl_toolkits.mplot3d import Axes3D
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    from mylib.fft import direct_fourier_transform
 | 
					    from mylib.fft import direct_fourier_transform
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -60,7 +61,7 @@ if __name__ == "__main__":
 | 
				
			||||||
    freq_cmap = cmap(freq_norm(test_freqs))
 | 
					    freq_cmap = cmap(freq_norm(test_freqs))
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        # Amplitudes Histogram
 | 
					        # Amplitudes Histogram
 | 
				
			||||||
        if False:
 | 
					        if True:
 | 
				
			||||||
            fig = plt.figure()
 | 
					            fig = plt.figure()
 | 
				
			||||||
            ax = fig.add_subplot(projection='3d')
 | 
					            ax = fig.add_subplot(projection='3d')
 | 
				
			||||||
            ax.set_xlabel("Amplitude")
 | 
					            ax.set_xlabel("Amplitude")
 | 
				
			||||||
| 
						 | 
					@ -145,7 +146,7 @@ if __name__ == "__main__":
 | 
				
			||||||
                    ax.plot(tmp_test_freqs, func_amps, ls='dotted', color=l[0].get_color())
 | 
					                    ax.plot(tmp_test_freqs, func_amps, ls='dotted', color=l[0].get_color())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Amplitudes figure
 | 
					        # Amplitudes figure
 | 
				
			||||||
        if not True:
 | 
					        if True:
 | 
				
			||||||
            fig, ax = plt.subplots()
 | 
					            fig, ax = plt.subplots()
 | 
				
			||||||
            ax.set_ylabel("Amplitude")
 | 
					            ax.set_ylabel("Amplitude")
 | 
				
			||||||
            ax.set_xlabel("Frequency")
 | 
					            ax.set_xlabel("Frequency")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue