Core Plot - get data to fill up x axis screen space - iphone

My Core Plot is almost finished up but I've noticed an unusual thing I need to change before calling it done. The x axis is scaled properly along the bottom, and the left and right edges indicate the range that I've set. The data, however, is all crushed together on the left side, almost as if the y values are not corresponding to their proper x values.
This image should demonstrate what I mean. You'll notice that the dates run along the bottom, but the actual values don't go past the 6/3/11 mark. They should be all the way to the right.
Link to image

Check the values returned by your datasource. Make sure the x-values are calculated from the same starting date and intervals that you used for the x-axis range and labels.

Related

Recalculate DICOM Window Center and Width on Subtraction of Dynamic MRI Sequence

I'm trying to calculate and present the Subtraction images of a Dynamic MRI Sequence. However, I've looked for quite some time and I can't seem to find how to relate the individual Rescale Slope and Intercept and even Window Center and Width fields with the respective fields for the new Subtracted image.
I'm sorry if it is a repost but I can't find the answer for this particular problem.
I guess that for Slope and Intercept I probably should just apply the old ones, subtract the images and make sure they are within uint16 range, but what about Window Center and Width?
Thanks in advance
About Rescale Slope and -Intercept:
You can apply the original values of the slices you subtracted, if they are all equal in the slices you subtract from each other. If they are not equal, you will have to rescale one of the slices to the slope/intercept of the other one before doing the subtraction. Otherwise, the subtraction will yield wrong grayscales. Obviously, the resulting subtracted image will then be assigned the slope and intercept of the slice you rescaled the other one to.
About Window Center and -Width:
There is no answer which is right or wrong. Windowing depends on the taste of the person viewing the images - ask three physicians and receive four different answers ;-)
I would rather recommend to calculate new values from the histogram of the subtracted image than trying to calculate them from the orginal slices. Subtraction means that you eliminate tissue. The original values were probably adjusted in such a way that this tissue is visible. Now that you have subtracted it you want to have a window that emphasizes the vessels - the rest is just noise.

How to reverse the direction of Y-Axis of MatLab figure generated by `imagesc()` function

I am trying to display data in a matrix using imagesc() function but it is showing row index in decreasing order (Assuming origin at left-bottom). Any idea what mistake i could be making or how to correct this?
The matrix only has zeros and ones in it.
Set Ydir property of the current axes to normal
By default, imagesc uses reverse for YDir
set(gca,'YDir','normal');
See Documentation for Axes properties
Before:
After:
Note: This completely flips the inside data as well (it supposed to). As you are dealing with matrices, I hope this is what you want.
If you don't want to affect inside data, you need to change order of YTickLabels instead.
There's another option which requires slightly less code:
axis ij
Reverse the coordinate system so that the y values increase from top to bottom.
As in this case (as it is already reversed), you could use
axis xy
To get back to normal, so that y values increases from bottom to top.
As mentioned in the docs of axis.

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 function surf axes going from high to low I want low to high?

Last question on this I swear.
Right now the plot of surf has the dates going from newest (i.e today) at the left hand side to oldest on the right hand side. I would like it to be the other wat round but keep everything else the same.
Is there a quick way to do this? Without having to reorganise the input data?
You can simply revert the direction of the axis. If it's the x-axis, you write
set(gca,'XDir','reverse')
gca grabs the handle to the currently active axes, so make sure that the surface is on the active figure, or store the axis handle somewhere and pass it instead as first argument to set.
Just replace the X in XDir if you want to do it for a different axis.
This can be set using axis properties:
Direction of increasing values. A mode controlling the direction of increasing axis values. Axes form a right-hand coordinate system. By default:
x-axis values increase from left to right. To reverse the direction of increasing x values, set this property to reverse.
set(gca,'XDir','reverse')
y-axis values increase from bottom to top (2-D view) or front to back (3-D view). To reverse the direction of increasing y values, set this property to reverse.
set(gca,'YDir','reverse')
z-axis values increase pointing out of the screen (2-D view) or from bottom to top (3-D view). To reverse the direction of increasing z values, set this property to reverse.
set(gca,'ZDir','reverse')

Core Plot Y axis expandRangeByFactor depends on data?

i have this problem with gap between Y axis changed when different data is being enter.
First: the third data point is close with other points
Second: the third data point is slightly further
Third: the third data point is even further from the other points
Somehow i change expandRangeByFactor then different kind of gap will appear between each Y axis line.
I wonder how can i have the Y axis gap being fix(not affected by the data that i've put in)?
Thanks
Don't change the yRange of the plot space. Be aware that methods like -scaleToFitPlots: and user interaction (scrolling, zooming) can change the ranges, too.