Skip to content

Commit

Permalink
Merge pull request #21 from ifilot/develop
Browse files Browse the repository at this point in the history
Adding x-axis centering feature + fixing minor bug
  • Loading branch information
ifilot committed May 2, 2023
2 parents 1c0608b + 93aa9cc commit dffe6bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions examples/al_fcc111_zavg.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@

data = np.loadtxt('z_extraction.txt')
plt.figure(dpi=72)

# to center the x-axis such that the origin lies at in the middle
# of the graph, uncomment the line below
#data[:,0] = data[:,0] - (np.max(data[:,0]) - np.min(data[:,0])) / 2

plt.plot(data[:,0], data[:,1], color='black')
plt.xlabel(r'z [$\AA$]')
plt.ylabel(r'$\rho$ [$\AA^{-3}$]')
Expand Down
8 changes: 4 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules )
SET(VERSION_MAJOR "2")
SET(VERSION_MINOR "0")
SET(VERSION_MICRO "1")
configure_file(config.h.in config.h @ONLY)
if(EXISTS "${CMAKE_BINARY_DIR}/config.h")
MESSAGE("[USER] Creating ${CMAKE_SOURCE_DIR}/config.h from ${CMAKE_BINARY_DIR}/config.h.in")
configure_file(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_SOURCE_DIR}/config.h @ONLY)
if(EXISTS "${CMAKE_SOURCE_DIR}/config.h")
MESSAGE("[USER] Creating ${CMAKE_SOURCE_DIR}/config.h from ${CMAKE_SOURCE_DIR}/config.h.in")
else()
MESSAGE("[USER] Could not find configuration file in ${CMAKE_BINARY_DIR}!")
MESSAGE("[USER] Could not find configuration file in ${CMAKE_SOURCE_DIR}!")
endif()

# Enable release build
Expand Down

0 comments on commit dffe6bf

Please sign in to comment.