Question

How can I plot two datasets together if they have different x axis values?

I want to plot flux data versus time. I have a dataset of flux values where the x-axis is timestamps (not chronological because ...

5 days ago | 1 answer | 0

Question

How do I determine the closest upcoming index (given a vector of the indices of interest) to each value in a vector of timestamps?

I have a record of timestamps at 5 minute intervals. I want to calculate the time (ideally in hours) until the next tide change ...

10 days ago | 1 answer | 0

Question

shift x axis to plot daytime hours before nighttime hours

I have a plot where the x axis is the hour of the day. Right now the xaxis starts at 0 and ends at 24. Instead, I want to plot t...

1 month ago | 1 answer | 0

Question

Why do colors "gray out" when I save figure as .eps

I am trying to save a figure as an EPS file so that I can open it in Adobe Illustrator. When I save my figure most of the colors...

3 months ago | 1 answer | 0

Question

How can I set the y tick interval (to powers of 10) on a log scale?

I have specified the limits of my x and y axis which are both on log scales. I want to also specify the intervals for the yaxes ...

3 months ago | 1 answer | 0

Question

Is it possible to set the size of the gap between grouped bars in a bar graph?

I know you can set the width of each bar (I set mine near max) but I am curious if I can minimize the white space by decreasing ...

3 months ago | 2 answers | 0

Question

When using yyaxis is there a way to plot the right yaxis data behind the left yaxis data?

I am trying to plot data on two different axes. I want the data associated with the right y axis (red lines) to plot behind the ...

6 months ago | 1 answer | 0

Question

I'm trying to shade profiles of different measurements over depths and the colors look limited

I am using contourf to plot data overdepth. The first panel looks fine, but in the second it looks like only four colors are bei...

6 months ago | 0 answers | 0

Question

Trouble adding error bars to bar graph

I am trying to add error bars to bar graph. The figure looks fine if I run it without the error bars as just bar(coh). (see atta...

6 months ago | 1 answer | 0

Question

How can I add a third axis to a plot

I made a figure using yyaxis to plot two different kinds of data on the same plot. I want to add a third timeseries with a y-axi...

8 months ago | 0 answers | 0

Question

How can I shade confidence intervals on a loglog plot?

I am trying to plot frequency spectra with 95% confidence intervals (upper and lower bounds). I am using pwelch to calculate pow...

8 months ago | 2 answers | 0

Question

add grid lines to minor x ticks

I am trying to make a plot where my x labels are weeks. I only want to label every other week, but I want x gridlines for every ...

8 months ago | 1 answer | 0

Question

add single isolines to contour plot (contourf)

I am trying to make contour plots for chemistry data. To simplify the plots I have removed the contour lines but I would like to...

9 months ago | 0 answers | 0

Question

set white in bluewhitered to z=1 (instead of zero)

I'm trying to highlight z=1 in a contour plot. I have used the bluewhitered colormap in the past to help discriminate positive f...

9 months ago | 0 answers | 0

Question

How can I shade confidence intervals and assign colors to frequency spectra plot (pwelch)

I am trying to plot power spectra for timeseries data with 95% confidence intervals. Right now I have plotted 2-3 depths of data...

10 months ago | 1 answer | 0

Question

Extract time data from a point by clicking

I used to be able to right click on a point and save it. Then I could pull out the x data (time) for indexing later. For some re...

11 months ago | 0 answers | 0

Question

How do I label the scatter colorbar with month and day

I wanted to color my scatter plot by date. I was able to do that with the code below but I want to me able to discrimate between...

12 months ago | 1 answer | 0

Question

Is there a way to select a good color scheme for easy figure viewing

I have timeseries data from nine depths under water. I was to plot it together and still be able to discriminate depth. Right no...

12 months ago | 1 answer | 0

Question

Determine daily derivative of time series data

I have a timeseries of oxygen (DO) data collected at 5 minute intervals. I want to calculate the daily derivate of oxygen (so 28...

12 months ago | 1 answer | 0

Question

years read in as 18 instead of 2018; how do I add 2000 years?

I checked similar questions asked and it seems like the previous answers aren't quite what I am looking for. I have a csv file w...

12 months ago | 1 answer | 0

Question

why are my cross correlation values so high?

I am trying to find the best lag for relating to vectors of data (attached in the mat files as vectors x and y). I want to do a...

12 months ago | 2 answers | 0

Question

correlation coefficients for a matrix that includes NaNs

I am trying to determine correlation coefficients and p values for different parameters of timeseries data. I have a matrix of f...

1 year ago | 1 answer | 0

Question

cut out section of x axis

I am plotting two experiments on the same x axis. I want to keep the xaxis from 7/11 to 7/14 and 7/18 to 7/20, but I want to cut...

1 year ago | 2 answers | 0

Question

Is there a way to add linear fit equations and r^2 values to multiple plots?

I have six subplots. Each is a property-property plot of pH and temperature. I would like to add the linear fit equation and r^2...

1 year ago | 1 answer | 0

Question

Assigned colorbar heights in pcolor subplots

I am making a lot of figures with pcolor subplots. I want all the x-axes to match so I am manually assigned the colorbar positio...

1 year ago | 1 answer | 0

Question

interp1 for matrix

I have two velocity matrices that I want to interpolate onto a new time vector. The matrices are both 8011x60 doubles where the ...

1 year ago | 2 answers | 0

Question

Different colormaps for subplots

I am having a frustrating problem that I think is related to how I am using handles to format the colormaps in my plots. I am tr...

1 year ago | 2 answers | 0

Question

Only include x labels on bottom subplot

I am plotting multiple timeseries together over the same time period (x = time). I want to only label the dates for the bottom s...

1 year ago | 2 answers | 0

Answered

Change colorbar scale, but keep zero value white

Yes it works if I don't include (currently commented out) the caxis line. The issue is the negatives look more extreme since the...

Change colorbar scale, but keep zero value white

Yes it works if I don't include (currently commented out) the caxis line. The issue is the negatives look more extreme since the...

1 year ago | 1

| accepted

Question

Change colorbar scale, but keep zero value white

I am trying to plot positive data as red (darker red=higher magnitude) and negative data as blue. I want zero to be white. I am ...

1 year ago | 1 answer | 1