Commit cd4904c5 authored by Lena noack's avatar Lena noack
Browse files

Some smaller bugfixes for graphics routines

parent a0f5bff2
......@@ -69,6 +69,7 @@ function data = get_data(data,input)
if(size(data.CO2,1)>1), data.CO2 = cut_field(data.CO2,nl,ny,nr);, endif % in ppm (?)
if(size(data.ref_r,1)>1), data.ref_r = cut_field(data.ref_r,nl,ny,nr)*data.rho;, endif
if(size(data.ref_a,1)>1), data.ref_a = cut_field(data.ref_a,nl,ny,nr)*data.alpha;, endif
if(size(data.MP,1)>1), data.MP = cut_field(data.MP,nl,ny,nr);, endif
if(size(data.U238,1)>1), data.U238 = cut_field(data.U238,nl,ny,nr)*10.0^6;, endif % in ppm
if(size(data.U235,1)>1), data.U235 = cut_field(data.U235,nl,ny,nr)*10.0^6;, endif % in ppm
if(size(data.Th232,1)>1), data.Th232 = cut_field(data.Th232,nl,ny,nr)*10.0^6;, endif % in ppm
......
%function make_movie(start=0,fpath=' ',vals=' ') for normal plots
function make_movie(start=0,fpath=' ',vals='TWHDvRM')
function make_movie(start=0,fpath=' ',vals='TWHDvVRMt')
if fpath==' '
[fname, fpath, fltidx] = uigetfile("data_char_val_ts.res");
......
......@@ -4,7 +4,8 @@
function plot_snap(max_depl=30,max_T=0,fullV=-1,part=0,reduc=1,fin=' ',print_plot=' ')
% if reduc=1, then plot only T2D, V2D, Vi2D, D2D, Mradp2D
addpath("/home/noacklen/Arbeit/SOURCE/CHIC/Octave")
%addpath("/home/noacklen/Arbeit/SOURCE/CHIC/Octave")
addpath("C:/Arbeit/Git_Source/CHIC/Octave")
%addpath("C:/Arbeit/NextCloud_FUB/CHIC/Code_Backup_March2020/Octave")
[data,input,program_dir,fname,fpath] = read_snap(fin); % read data from snapshot
......@@ -25,8 +26,8 @@ function plot_snap(max_depl=30,max_T=0,fullV=-1,part=0,reduc=1,fin=' ',print_plo
data = get_data(data,input); % get fields for plotting and dimensionalize if needed
cd(fpath);
mkdir "plots";
%graphics_toolkit gnuplot
graphics_toolkit("fltk")
graphics_toolkit gnuplot
%graphics_toolkit("fltk")
%size(data.depl)
......@@ -132,7 +133,8 @@ else
%% produce_plot('PD2D_',"Tracer",data.output_tracer,input,data,res,ar,50,'jet',min_z=-1,max_z=-1,full=fullV,partX=A(:,1),partY=A(:,2),partV=A(:,17))
%% produce_plot('TD2D_',"Tracer",data.T,input,data,res,ar,50,'jet',min_z=min_T,max_z=max_T,full=fullV,partX=A(:,1),partY=A(:,2),partV=A(:,17))
elseif(size(data.output_tracer,1)>1)
produce_plot('O2D_',"Tracer",data.output_tracer,input,data,res,ar,50,'jet',min_z=-1,max_z=-1,full=fullV)
produce_plot('O2D_',"Buoyancy (-1e10)",-data.output_tracer*1e-10,input,data,res,ar,50,'jet',min_z=0,max_z=7,full=fullV)
# produce_plot('O2D_',"Tracer",data.output_tracer,input,data,res,ar,50,'jet',min_z=-1,max_z=-1,full=fullV)
endif
endif
......
......@@ -6,7 +6,8 @@ import matplotlib.cm as cm
import matplotlib.colors as colors
import os, sys
path = 'C:/Arbeit/Video_Venus_MOprofs/'
#path = 'C:/Arbeit/Video_Venus_MOprofs_PhaseTrans_1000K/'
path = 'C:/Arbeit/Video_Venus_MOprofs_PhaseTrans_NoChemBuoy/'
plot_path = path+'plot/'
file = None # 'PlotData_TWHDvRMt0011564.txt'
start = 0 # use higher number to exclude first time steps
......@@ -74,6 +75,8 @@ def make_plot_snap(filename):
set_plot_values('Water fraction in ppm','RdBu',vmin=0,vmax=140,nr_cont=100,nameF='W2D')
elif letter == 'v':
set_plot_values('Velocity in cm/yr','rainbow',vmin=0,vmax=25,nr_cont=100,nameF='v2D')
elif letter == 'V':
set_plot_values('Viscosity in log10 Pa s','rainbow',vmin=18,vmax=25,nr_cont=100,nameF='Vi2D')
elif letter == 'R':
# set_plot_values('Material parameters','rainbow',vmin=3,vmax=7,nr_cont=4,nameF='R2D')
# set_plot_values('Material parameters','Set2',vmin=3,vmax=7,nr_cont=4,nameF='R2D')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment