Adding x error bars to a scatter plot in tableau - tableau-api

I have a scatter plot in tableau:
I am looking to add error bars to the points but cant find how to do this. I would need to specify the lower limits and upper limmits (i.e. not just a fixed percentage of the value). The only thing I can find is adding y errors in the form of a gant plot but this isnt helpuful (I dont think) as I only need x errors.

Its possible with a combination of using Measure Values (to show lines between the error ranges) and a dual axis (to overlay the X values on the lines)
See sample workbook

Related

Matlab date help on x-axis

I have a porkchop plot that looks similar to this:
The contour function used to make it has input arguments for the x and y positions that are serial dates (as that seemed to be required by MATLAB). Then I used the following command to get the format I want:
datetick('x', 2); datetick('y', 2);
The problem I am having is that when I zoom in on the plot the tick labels to not autogenerate and I can be left with no ticks on the x or y axis if I zoom in to use a weeks' date range for example.
I tried enabling 'auto' for XtickMode and YtickMode but when I zoom in or pan after using those commands the relationship between the independent and dependent variables are lost for some reason (aka the dates don't stay with data like they do when you just have numbers on the x axis and zoom in).
Any ideas on how to solve this issue to get the functionality I'm looking for?
I have also tried the command xtickformat('dd-MMM-yy') but I get an error "Invalid numeric tick label format." when I use it with the contour plot.
As far as I know there is no builtin method in MATLAB to do this. I use the datetickzoom function from the MATLAB FileExchange. If you replace all instances of datetick with datetickzoom, it will automatically update the relevant axis labels when you zoom in.

Plot two data sets on the same axes but offset along the x-axis

Probably my explanation is not good, I need following kind of graphs. Matlab, sigmaplot solution will be welcomed. Graphpad Prism may also be an option.
The x-axis is splitted, actually 2 data sets (same x-axis but different y-axis). it is error plot (mean I also need error bars)

matlab: how to plot different errorbars in bar graph

i want to plot different errorbars std_a/b/c in my bar graph
a=5; std_a=0.9;
b=6; std_b=0.5;
c=7; std_c=0.2;
%plot
bar([a,b,c]);
errorbar([a,b,c],[std_a,std_b,std_c]);
somehow this is not working. how can get for each bar the correct errorbar?
You're close. errorbar by default plots a line and adds errorbars to it, and if you haven't called hold on or hold all it will overwrite what you already have. If you just want the error bars and not lines between them, give it a plot format that only plots points, like r.:
bar([a,b,c]);
hold on
errorbar([a,b,c],[std_a,std_b,std_c],'r.');
I had to improve location of the error bars on x axis because for more than one data series the bars appear side by side, while the error bars may appear one on top of the other.
for data with two columns and serr (standard error in my case) of the same size I used a shift to the left and right of +-1.4 (see gap in the code below).
gap=0.14;
X=1:length(data);
X=[X'-gap,X'+gap];
errorbar(X,data,serr,'k.');
you can specify a third input argument of zeros the same size of serr, if you want to minimise the bottom bars so that only top error bars show.

Tableau Control Chart - Attribute measure incorrect

All
I have a control chart, with on the X-axis a time period, and the Y-axis the value of the measure (I'd like to plot all the points in a control chart).
However, I have 2 different values as a measure, which have the exact same date (up to a second match) but different measure values.
When I plot this on a control chart, instead of having 2 points in the control chart with value 500 and 550 for example - it gives me one point with a value of about 200.
It also gives a notification that there is a NULL value in this axis, which points to the X-axis where 2 records have the exact same date.
Any idea what I can do to make this correct - or make tableau draw the measure points correctly?
Thanks in advance!
It's difficult to answer without seeing more detail about your problem, but this sounds like a good candidate for a blended axis. (multiple measures sharing a single axis)
The easiest way to do this is to put your (probably continuous) datetime field on the row axis and one of your measures on the row axis to see one of then control plots. Then drag the second measure to the Y-axis until you see a little translucent two bar icon to indicate that you are adding a second measure to that axis, at which point you can release the pointer and you should see a two plots on the same axis.
If the scales for the two measures are radically different, you can instead drag the second measure to the right side instead to get a dual axis.

MATLAB: Plotting two different axes on one figure

The MATLAB surf plot below is essentially two plots plotted adjacent to each other. For clarity, I have included some code below used to prepare the plot:
band1 = horzcat(band1, eSurface2(:,:,1));
band2 = horzcat(band2, eSurface2(:,:,2));
surf(band2,'DisplayName','band2');
surf(band3,'DisplayName','band2');
I would like for the y axis numbering to restart at the start of the second graph. How do I go about doing that?
You can use the 'YTick' and 'YTickLabel' properties of the axis to control the ticks, this way you can make it start from zero for the second graph. It will require some trail and error to get it right. See the relevant doc here (you'll have to scroll all the way to the bottom of the page).
Take advantage of the following feature of 'YTickLabel': "If you do not specify enough text labels for all the tick marks, MATLAB uses all of the labels specified, then reuses the specified labels".