Open heril96 opened 2 months ago
To clarify, this problem is not in add_ruler
, but show_bounds
?
No, it is there in add_ruler for sure.
Show bound is also have similar strange behaviour but it is not required now.
Can you add a second issue for the direction of the ruler with an example with code, if it continues to be an issue? I highly suspect it is due to this line in the documentation of add_ruler
.
The title and labels are placed to the right of ruler moving from pointa to pointb. Use flip_range to flip the 0 location, if needed.
Note that you can use different choices of pointa
and pointb
and flip_range
to get the desired number ordering and side for the labels.
Can you add a second issue for the direction of the ruler with an example with code, if it continues to be an issue? I highly suspect it is due to this line in the documentation of
add_ruler
.The title and labels are placed to the right of ruler moving from pointa to pointb. Use flip_range to flip the 0 location, if needed.
Note that you can use different choices of
pointa
andpointb
andflip_range
to get the desired number ordering and side for the labels.
previously when i was trying to show ruler with the command "p.add_ruler([0,0,0],[-0.7,0,0],number_labels=5, font_size_factor=0.4) " Then it was showing the labels above axis as shown in the image attached before but now when i tried it with command as per your suggestion it looks normal. I think we have to handle this differently to show it correct way. The command i used now is as below "p.add_ruler([-0.70,0,0],[0,0,0],flip_range=True,number_labels=5,font_size_factor=0.4)"
Describe the bug, what's wrong, and what you expected.
I found a bug!
My application required adding multiple ticks and the data set where i am using pyvista is multiblock data set with x axis range from -1.4m to 1.4. I am adding two rulers one in +ve x dirn and another in -ve x dirn, the issue is I can only add total 5 labels from 0 to 1.4m even if i want to add 20. Moreover when i use ruler in negative x-dirn which is 0 to -1.4m the ticks are above the x axis and total label number is fixed to 5. Attached image!
Below is different example pasted for which increasing the number of labels is not changing the number of labels (but the numbers do change, please try) but reducing the number_labels reduces the ticks. If i want to produce 15 ticks it is not possible here but produce 3 is possible in below example.
Steps to reproduce the bug.
System Information
Screenshots