Adjust isopycnal line in tsdiagram

6 Ansichten (letzte 30 Tage)
주희 박
주희 박 am 8 Jul. 2022
Hi I want to adjust isopycnal line of ts diagram. I draw below tsdiagram using theta_sdiag(I got it on web).
I want to show specific values like 27.0, 27.1,27.2,27.3 .. not 26.9626 and 27.0552 like below picuture.
Thanks in advance.

Antworten (1)

sai charan sampara
sai charan sampara am 20 Okt. 2023
Hello 주희 ,
I understand that you are trying to use “tsdiagram” file from file exchange to plot TS diagram.
You want to adjust “isopycnal” lines that are plotted by the “theta_sdiag” function. These lines are being generated by the line 21 which is:
[c,h]=contour(si,thetai,dens,'k');
In this line of code, contour plots of x data “si” and y data “thetai” are being plotted at levels decided by z that is “dens”. This variable “dens” denotes the levels at which the lines are plotted. To get lines at more rounded values the variables “dens” can be rounded to one decimal place. It can be done by changing line 17 in “theta_sdig” as follows:
dens(j,i)=round(sw_dens(si(i),thetai(j),0),1)
This will give lines at values with only one number after decimal point.
You can refer to the below documentation to learn more about contour plot:
Hope this helps.
Thanks,
Charan.

Kategorien

Mehr zu Contour Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by