Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic Plotting Module (#22) #38

Merged
merged 18 commits into from
Aug 16, 2019
Merged

Basic Plotting Module (#22) #38

merged 18 commits into from
Aug 16, 2019

Conversation

JinraeKim
Copy link
Contributor

@JinraeKim JinraeKim commented Aug 12, 2019

Plotting module.

  1. Location
    nrfsim/utils/plotting.py
  2. Instruction
    Main class: PltModule
    Main methods
  1. plot_time for plotting time histories
  2. plot_traj for plotting trajectory.

Input: data, variable names, physical quantities, and labels for the data.
e.g.

data = {'obs': obs_series, 'traj': obs_series[:, 0:2]}
variables = {'obs': ('x', 'y', 'V', 'gamma'), 'traj': ('x', 'y')}
quantities = {'obs': ('distance', 'distance', 'speed', 'angle'), 'traj': ('distance', 'distance')}
labels = ('obs', 'traj')
a = PltModule(time_series, data, variables, quantities)
a.plot_time(labels)
a.plot_traj(labels)

Output: time histories (plot_time), trajectory (plot_traj)

  1. Result example
    (After running main_missile.py)
  1. time histories of obs, traj
    image
  2. trajectory
    image

JinraeKim and others added 10 commits August 9, 2019 22:13
…e.py runs (didn't check that it gives appropriate values)
model & env: missile planar engagement against stationary target
file name change
iss10 is merged to develop, so I merged iss10 to iss9.
delete temporary file
get_reward input #: 2 -> 1
module for plotting variables such as 'obs'. See
'nrfsim/utils/plotting.py'.
@JinraeKim JinraeKim added the good first issue Good for newcomers label Aug 12, 2019
@JinraeKim JinraeKim added this to the Sprint 2 milestone Aug 12, 2019
@JinraeKim JinraeKim requested review from seong-hun and JungYT August 12, 2019 06:47
@JinraeKim JinraeKim self-assigned this Aug 12, 2019
@JinraeKim
Copy link
Contributor Author

@seong-hun @JungYT
Please leave your comments.

@JungYT
Copy link
Contributor

JungYT commented Aug 12, 2019

3차원 그림 제대로 나오는지 확인 해보기

3d plot bug fix
minor bug fix
@JinraeKim
Copy link
Contributor Author

main.pyobsget_ob 를 다소 수정하여, 3d plot이 적용되는 것을 확인하였습니다.
image

maximum line length 79
@JinraeKim
Copy link
Contributor Author

Codes were modified to satisfy PEP8 (maximum line length < 80).

PEP8: maximum line length < 80
@JinraeKim JinraeKim changed the title Feature/iss22 Basic Plotting Module (#22) Aug 14, 2019
Copy link
Owner

@seong-hun seong-hun left a comment

Choose a reason for hiding this comment

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

Good

@JinraeKim JinraeKim merged commit 81101c6 into develop Aug 16, 2019
@seong-hun seong-hun added enhancement New feature or request and removed good first issue Good for newcomers labels Aug 16, 2019
@JinraeKim JinraeKim deleted the feature/iss22 branch September 9, 2019 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants