Skip to content

Commit

Permalink
plot
Browse files Browse the repository at this point in the history
  • Loading branch information
montyvesselinov committed May 6, 2022
1 parent 9ede591 commit 6cd82b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Interpolations = "0.12, 0.13, 0.14"
JLD = "0.10, 0.11, 0.12, 0.13"
JLD2 = "0.2, 0.3, 0.4, 0.5"
JuMP = "0.21, 0.22, 0.23, 1"
Mads = "1"
Mads = "1.3.1"
Measures = "0.3, 0.4"
MultivariateStats = "0.7, 0.8, 0.9"
NLopt = "0.6, 0.7"
Expand Down
26 changes: 1 addition & 25 deletions src/NMFkPlot.jl
Original file line number Diff line number Diff line change
Expand Up @@ -714,29 +714,5 @@ function r2matrix(X::AbstractArray, Y::AbstractArray; normalize::Symbol=:none, k
return D
end

"""
Set image file `format` based on the `filename` extension, or sets the `filename` extension based on the requested `format`. The default `format` is `PNG`. `SVG`, `PDF`, `ESP`, and `PS` are also supported.
$(DocumentFunction.documentfunction(setplotfileformat; argtext=Dict("filename"=>"output file name")))
Returns:
- output file name
- output plot format (`png`, `pdf`, etc.)
"""
function setplotfileformat(filename::AbstractString, format::AbstractString="PNG")
d = splitdir(filename)
root, extension = splitext(d[end])
if extension == ""
extension = lowercase(format)
filename = joinpath(d[1], root * "." * extension)
else
format = uppercase(extension[2:end])
end
if format == "EPS"
format = "PS"
end
return filename, Symbol(format)
end

setplotfileformat = Mads.setplotfileformat
plotfileformat = Mads.plotfileformat

2 comments on commit 6cd82b3

@montyvesselinov
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/59841

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.2.0 -m "<description of version>" 6cd82b3b80ce134e8b60c47e1cf53f205e76e9ac
git push origin v1.2.0

Please sign in to comment.