JavaFX - Logarithmic Slider Tick Marks - javafx

I was wondering if there is a way to make a JavaFX Slider to show logaritmically spaced tick marks. I suspect there is none. If this is the case what would be the best way to go about implementing this do you think? I should mention that I have seen this but the accepted answer is not what I want.
So what I know is possible is this:
But I want are tick marks spaced like this: http://www.dplot.com/logarithmic/loglin_h600.png
That the tick marks show their respective values is not important.
Thanks for your time.

You can use a linear Slider with linear tick marks and every time you get a result you calculate the logarithmus of it and work with that.

Related

Plotly - I want to color the Y axis tick text based on value

My questions is similar to one that's been asked but in a different language. I'm using plotly in python, to build dash web app dashboards and I have graphs with a y-axis range from negative values to positive values. I would like to leave the positive values black, but I would like to change the negative values to be red (preferably with parentheses around them as well, but the red color is the more important item).
From my research, it seems that there is no native way to do this. I'm up for a complicated solution if that's what it takes. When I inspect the element in the web interface, I can see the html code that shows the RGB values for the text of each tick, but I cannot seem to figure out where I can modify the colors independently of the other tick texts. I've started looking for the source file that is used to format these things so that I can potentially add the logic to it.
The similar question is here and it was asked for JavaScript: Plotly - I want to color each X Axis value in different color based on condition
Any help is appreciated.

Replicate thinkcell "cutout/breaks" in R chart

I have very sparse data and I want to adjust the chart so that I can show the amount of the positive event rather than it being a speck on the chart next to the negative class.
In thinkcell ( an excel and powerpoint add in), there is a cool feature where you can effectively "hide" a part of the frequency. An example is here.
The squiggly lines are a cut off to change the scale.
The kind of data I am working with
a<-data.frame("Changed"=rep(0,900))
b<-data.frame("Changed"=rep(1,50))
example<-data.frame(Changed=rbind(a,b))
hist(example$Changed)
Any suggestions on how to do this or how to represent this? I guess at worst I could change the limit of the chart and just label it to show the value in the base... but its not that pretty or obvious.
Appreciate any thoughts.
J

ggplot: Axis Text Label Width?

I'm currently struggling immensely to get the axis text in a graph that I'm designing to automatically format such that it cuts off when it becomes too long. I would ideally implement some sort of character cut off, but I'd ideally prefer to refrain from sticking '\n' after every 2 words. I've dug through the libraries for solutions, but couldn't find any.
It'd also be lovely if I could somehow prevent the graph from shifting upwards, as it makes it incredibly difficult to compare with the 'other' graph next to it.
I've largely been using ggplot and theme settings to make the changes.
Is it possible to make these changes? (1. width limit on axis text, 2. stop area expansion)

How to plot just one axis label in R?

A beginner question: I currently have some plots that look like this.
I'm keeping the plots free of other annotation because I have to fit a lot of them onto one page and specific values aren't important, just the general trend that the red line is to the right of the black one. However, I'd like to be able to indicate that the dashed line in my plot actually represents zero, like so:
Is there any way to tell R to only display that value on the x-axis labels? I don't think using text() would be a good idea because it relies on absolute coordinates, but I'm not really sure how to work with axis options to make it do what I want.
Try:
axis(side = 1, at = 0)
See ?axis for details.

customize x-axis interval for a real time line chart in achartengine

I have a real-time line chart. For that I use TimeSeries. Now I get new values every second. But I don’t want to get a x-axis line every second. I like to get one every ten seconds.
So maybe, first it would be important to know where the x-axis lines were painted. Is it xymultipleseriesdataset.addSereies(timeSeries)? So maybe I can create a loop that add every 10 second a new title for the x-Axis... or am I totally wrong?
If I am right, you are asking for a way to control which labels are shown on the x-axis.
To do that, you may use the XYMultipleSeriesRenderer.addXTextLabel(timeInMillis, "requiredlabel").
This will cause the automatic generation of labels to stop and you can then have complete control on which labels are shown and which are not.
Edit:
Seems like I was wrong about automatic generation of labels stopping.
Use the method XYMultipleSeriesRenderer.setXLabels(0) to stop the generation of labels. This method is used to set how many labels should be generated for the x axis. Passing 0 should stop automatic labels to stop altogether.

Resources