What is the best way to plot many curves as a parameter changes?
1 回表示 (過去 30 日間)
古いコメントを表示
- Planar_Lyapunov_SEM_L1_3.0005767_050.txt
- Planar_Lyapunov_SEM_L1_3.0005833_049.txt
- Planar_Lyapunov_SEM_L1_3.0005900_048.txt
- Planar_Lyapunov_SEM_L1_3.0005966_047.txt
- Planar_Lyapunov_SEM_L1_3.0006032_046.txt
- Planar_Lyapunov_SEM_L1_3.0006099_045.txt
- Planar_Lyapunov_SEM_L1_3.0006164_044.txt
- Planar_Lyapunov_SEM_L1_3.0006231_043.txt
- Planar_Lyapunov_SEM_L1_3.0006297_042.txt
- Planar_Lyapunov_SEM_L1_3.0006363_041.txt
- Planar_Lyapunov_SEM_L1_3.0006429_040.txt
- Planar_Lyapunov_SEM_L1_3.0006496_039.txt
- Planar_Lyapunov_SEM_L1_3.0006561_038.txt
- Planar_Lyapunov_SEM_L1_3.0006627_037.txt
- Planar_Lyapunov_SEM_L1_3.0006693_036.txt
- Planar_Lyapunov_SEM_L1_3.0006760_035.txt
- Planar_Lyapunov_SEM_L1_3.0006825_034.txt
- Planar_Lyapunov_SEM_L1_3.0006892_033.txt
- Planar_Lyapunov_SEM_L1_3.0006958_032.txt
- Planar_Lyapunov_SEM_L1_3.0007024_031.txt
- Planar_Lyapunov_SEM_L1_3.0007090_030.txt
- Planar_Lyapunov_SEM_L1_3.0007156_029.txt
- Planar_Lyapunov_SEM_L1_3.0007223_028.txt
- Planar_Lyapunov_SEM_L1_3.0007289_027.txt
- Planar_Lyapunov_SEM_L1_3.0007355_026.txt
- Planar_Lyapunov_SEM_L1_3.0007421_025.txt
- Planar_Lyapunov_SEM_L1_3.0007488_024.txt
- Planar_Lyapunov_SEM_L1_3.0007553_023.txt
- Planar_Lyapunov_SEM_L1_3.0007620_022.txt
- Planar_Lyapunov_SEM_L1_3.0007686_021.txt
- Planar_Lyapunov_SEM_L1_3.0007752_020.txt
- Planar_Lyapunov_SEM_L1_3.0007818_019.txt
- Planar_Lyapunov_SEM_L1_3.0007885_018.txt
- Planar_Lyapunov_SEM_L1_3.0007951_017.txt
- Planar_Lyapunov_SEM_L1_3.0008017_016.txt
- Planar_Lyapunov_SEM_L1_3.0008083_015.txt
- Planar_Lyapunov_SEM_L1_3.0008149_014.txt
- Planar_Lyapunov_SEM_L1_3.0008215_013.txt
- Planar_Lyapunov_SEM_L1_3.0008281_012.txt
- Planar_Lyapunov_SEM_L1_3.0008347_011.txt
- Planar_Lyapunov_SEM_L1_3.0008413_010.txt
- Planar_Lyapunov_SEM_L1_3.0008479_009.txt
- Planar_Lyapunov_SEM_L1_3.0008546_008.txt
- Planar_Lyapunov_SEM_L1_3.0008612_007.txt
- Planar_Lyapunov_SEM_L1_3.0008678_006.txt
- Planar_Lyapunov_SEM_L1_3.0008744_005.txt
- Planar_Lyapunov_SEM_L1_3.0008810_004.txt
- Planar_Lyapunov_SEM_L1_3.0008876_003.txt
- Planar_Lyapunov_SEM_L1_3.0008943_002.txt
- Planar_Lyapunov_SEM_L1_3.0009009_001.txt
- SEM_L1_Periodicity_check.txt
- SEM_L1_SystemData.txt
Hi to everyone,
In my plot I have 50 curves and each of one corresponds to a specific value of a parameter called Jacobi constant. I want to show with an arrow and/or with a color gradient (and the relative legend in the colorbar form) the increasing direction of this constant in my figure, something like the following image modified "by hand":
Can you show me how to code the two alternatives (arrows and color gradient)?
For the color gradient plot I would want to color my curves according the colorbar colors shown in the right side of this image. Can you help me to code in order to satisfy my request?
Edit - The curves represent a family of Lyapunov orbits and each of them corresponds to a specific value of Jacobi constant. I attached the code and the relative data:
% Definition of path names
input_path_Fortran = 'D:\OneDrive\MSc_Thesis\Projects\Planar_Lyapunov_orbits\InputFiles\';
output_path_Fortran = 'D:\OneDrive\MSc_Thesis\Projects\Planar_Lyapunov_orbits\OutputFiles\';
%Automatic .txt file detection in the aboved specified folders
files_Ly_i_c = dir([input_path_Fortran, '\*.txt']);
files_Ly_filt_i_c = dir([output_path_Fortran, '\*.txt']);
% QUESTI DATI AGGIUNTIVI MEGLIO METTERLI NEL DATABASE
% ESTERNO!!!!!!!!!!!!!!!!!!!!!!!!!!!!
% Import L-points coordinates (same file in SEM_L1 and SEM_L2 folders)
Ly_orb_filt_sys_data = table2struct(import_Ly_orb_sys_data_file(fullfile('SEM_L1','SEM_L1_SystemData.txt'),2,inf));
% Data structures creation
%Ly_orb_test = zeros(1,2) % Pre-allocations
for i=1:numel(files_Ly_i_c) % index for L1 and L2 (1:2)
% Import original databases for L1 and L2 Ly. orb. initial conditions respectively containing data about 4183 and 2171 orbits
Ly_orb(i).i_c = table2struct(import_Ly_orb_i_c_file(fullfile(input_path_Fortran,files_Ly_i_c(i).name),3,inf));
% Import filtered databases for L1 and L2 Ly. orb. initial conditions both containing data about 50 Ly orbits quasi-evenly spaced according Jacobi constant
Ly_orb_filt(i).i_c = table2struct(import_Ly_orb_i_c_file(fullfile(output_path_Fortran,files_Ly_filt_i_c(i).name),4,inf));
%Automatic detection of files of propagated L1 and L2 Ly. orb. in the relative folders
files_L1_L2_Ly_prop = dir(['SEM_L', num2str(i) '\*.txt']);
% Import propagated L1 and L2 Lyapunov orbits
for j = 1 : (numel(files_L1_L2_Ly_prop)-2) % Index for number of L1 and L2 orbits (1:50)
Ly_orb_filt(i).prop(j).orbits = table2struct(import_Ly_orb_prop_file(fullfile(['SEM_L', num2str(i)],files_L1_L2_Ly_prop(j).name),3,inf));
end
end
2 件のコメント
Riccardo Scorretti
2022 年 4 月 1 日
Hi Giuseppe, can you send the data? Under which format do you have the curves?
回答 (1 件)
Sam Chak
2022 年 4 月 1 日
I think @Giuseppe is trying to plot the potential energy around one of the 5 Lagrangian Points in the Earth–Moon System. I don't have his data, but if you are interested, you can try exploring the script below to adjust the color gradient. I'm not good at the plot properties. Can also refer to the contour image with color gradient in the link.
Desired_mesh = 61;
Lower_bound = -pi/2;
Upper_bound = pi/2;
step = (Upper_bound - Lower_bound)/(Desired_mesh - 1);
[x, y] = meshgrid(Lower_bound:step:Upper_bound, Lower_bound:step:Upper_bound);
mu = 0.01;
u = - (1 - mu)./sqrt((x + mu).^2 + y.^2) - mu./sqrt(abs(x - (1 - mu)).^2 + y.^2) - (1/2)*(x.^2 + y.^2);
contour(x, y, u, 5001)
参考
カテゴリ
Help Center および File Exchange で Orange についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!