I want to stop resizing the graph axis (x,y), if any filter on the data is used in tableau. Can anyone helpe with this?
Double click on the axis to edit its characteristics (or right click on it and choose edit axis)
By default, the axis upper and lower bounds are set automatically based on the range of data that appears. If you wish to fix one or both ends to a constant value, just change that setting in the axis editing dialog.
You’ll see a push-pin icon on the axis to remind you that the axis bounds are pinned. That reminder is useful because if there is data that is beyond the bounds of the axis, it will be clipped and not shown.
BTW, this is the exactly the same thing that happens when you zoom in on a map or chart, you’re pinning the axes to display only part of the region.
Related
Note: This is not answered by the suggested question - it is practically the opposite of it. Besides, it is me who asked that question too and I also linked to it below.
I am fixing someone else's VBA code for SolidWorks which places drawing views next to each other based on their size.
Size of a view is taken from bounding box returned by View.GetOutline() and view's position is set by changing View.Position property.
The code processes multibody parts, creating one drawing sheet per body.
The problem is that View.Position property corresponds to center of bounding box that includes Temporary Axes while View.GetOutline() does not include them - it returns a bit more than the selection outline shown by SolidWorks GUI.
This is the multibody part and one of the offending drawing views with temporary axes turned on in the SW GUI:
In the drawing you can see:
selection outline shown by SW GUI (light blue dotted rectangle)
diagonal of the outline returned by View.GetOutline() (red line)
center of the view as in View.Position property (red X)
temporary axes (blue crosses and lines)
Is there a way to get drawing view's real size, the one that correspond to the bounding box whose center is the View.Position property?
Apparently, the drawing view includes temporary axes from other bodies in this multibody part.
That points to the alternative question: Is there a way to prevent temporary axes from other bodies in a multibody part from being included in drawing view of a single body?
For reference, the problem is the same no matter which method is used to create the view (e.g. CreateDrawViewFromModelView3(), CreateUnfoldedViewAt3(), CreateRelativeView(), etc.).
Note: I asked another question that stems from this same problem which I changed because I wrongly assumed that View.GetOutline() does not include Temporary Axes.
I found an easy way to do that.
Yesterday I had the same problem and I've fixed the issue.
As you correctly have stated there is an offset between the Bouding Box center on the drawing and the View center (whose coordinate are given by the View.Position property in VBA).
Actually you want to place the your view according the Bounding Box (BB) center (let's call this position DesiredBBPos)...but we have to set the position through View.Position property.
So what you have to do is just to get this offset before moving the view.
The offset is the difference between the View center point (View.Position(0) ; View.Position(1)) and the BB center ((Xmax+Xmin)/2 ; (Ymax+Ymin)/2 )
I have defined an array Offset(1) in which I've put the Horizontal Offset and Vertical Offset (as above)
Now you can set the view position by a formula that will look like:
View.Position (0) = DesiredBBPos(0) + Offset(0)
View.Position (1) = DesiredBBPos(1) + Offset(1)
It works ;)
Aldo
I'm trying to make a slider for a simple scale where the user can see mouse movement ONLY in the horizontal axis (fixed y location on the horizontal scale).
In more detail: When the scale appears, I want the cursor to appear as a short vertical line (aka slider) in the center of the horizontal scale.
When the user moves the mouse, the slider should move accordingly on the horizontal axis (without reflecting any changes in the vertical axis, i.e. it should stay on the scale)
I'm stuck on both changing the appearance of the cursor to a vertical line slider and on limiting the cursor's movement to the horizontal axis.
Here's what I've tried:
I can successfully place the cursor with SetMouse.
I tried ShowCursor to change the appearance of the cursor, but this only has a few named options and the numbered ones are not portable across OSs ("mapping of numbers to shapes is operating system dependent"), which I need. Any other ideas on how to change the cursor to a vertical line slider?
As for limiting the movement to horizontal, I couldn't find any PTB functions that seem to do this. I did find some workarounds in Matlab to make user GUIs, but it seems these can't be used with PTB's screen. Any ideas would be great!
I'm a still very new to PTB so thank you so much for your help!
I wrote a function for exactly that called slideScale. If you want to see how it works see the test script.
The crucial thing for you is to create a loop, which runs until a click has been made and record the position of the cursor for instance with the function GetMouse(), which gives you the x- and y-coordinates of the cursor. Then, the only thing you basically need is to update the position of your vertical line using the x-coordinate you recorded with GetMouse() without changing the y-coordinates, for which you can just use a fixed value.
I've set up a core plot graph with two plot spaces - one for a set of bar charts, with its y-axis on the left, and one for a scatter plot with its y-axis on the right. It works, except that the grid lines don't match up:
Both axes have their labeling policy set to CPTAxisLabelingPolicyAutomatic. Is there a way to change the axes so that the grid lines match up?
Not with the automatic labeling policy on both axes. You could keep the automatic labels on one side. Read the tick locations and use that to decide what plot range (yRange) and tick locations to use on the other side so they match up. If you allow the user to change the plot range outside control of your app (e.g., by scrolling and/or zooming), use a plot space delegate to monitor changes and update the secondary axis labels as needed.
There are two ways of opening a ToolTipDialog. One is by giving 'around' attribute which is a DOM node and other is by giving x and y coordinates. If we give 'around' attribute, we can also give 'orient' attribute to define the positioning of ToolTipDialog with respect to the DOM Node.
However, I have to open ToolTipDialog adjacent a certain gfx shape. Since this shape is not a Dom node I have to use x, y coordinate to position the ToolTipDialog. But in this case, I always get a default orientation (the pointer/notch) always points upwards.
Is there a way I can change the orientation by giving x, y coordinate such that I can ensure that ToolTipDialog now opens with the notch on its left side or on bottom side ? Also can I modify the point where this notch will be created ? It could be possible that ToolTipDialog is opened a bit shifted upwords and I may need the notch at the center of one of its side.
Finally, am I right in using the ToolTipDialog for my purpose, or should I use some alternative ?
I am unable to set the label name exact below the bar of bar chart. How to change its origin value to move right side so that it will be exact below of the bar. Please find the image here in this link: i.imgur.com/kJEeM.png
I am search for solution, yet I did not get any solution please help me out of this....
You should use axis labels on the x-axis. There are several example apps included with Core Plot that show how to format dates on the axes. If you already have the text of the labels, you can use custom labels instead. There are examples of that technique, too. The linked image doesn't show an axis line--just set the axis and tick line styles to nil to suppress drawing the axis line.