# Tag Info

0

This is not meant to be an answer but a comment to Emilio's post. I do not have enough reputation to comment on the post. I had a few issues with the LogScaleLegend function. ( I am using Mathematica v10.1) Specifically, the list "numberedTicks" contained zeroes and didn't contain all the tick values properly. The following dirty fix works for me: Modify ...

3

data = {8, 9, 13, 13, 14, 18, 22, 27, 30, 34, 38, 38, 40, 44, 45, 47, 48, 48, 48, 48, 50, 53, 56, 57, 58, 58, 61, 63}; SeedRandom values = RandomInteger[{1, 10}, Length@data] {2, 5, 1, 8, 1, 1, 9, 7, 1, 5, 2, 9, 6, 2, 2, 2, 4, 3, 2, 7, 1, 3, 7, 5, 6, 5, 4, 1} Construct a data set of pairs from data and values: pairs = Transpose[{data, values}]; ...

5

You can use a single plot if you separate the Piecewise conditions into separate ConditionalExpression objects. To do this, you can use an internal function to determine the intervals of validity for each piecewise condition, and then create a list of ConditionalExpression objects. The internal, undocumented (and hence subject to change) function to use is ...

4

Clear["Global`*"] test[r_] := Piecewise[{{Exp[r], r < -1}, {1 - r^2, -1 < r < 1}, {Sin[Pi r], r > 1}}]; plotRng = {-3, 3}; Extract plot intervals from Piecewise and the specified pltRng intervals = {Cases[test[r][[1, All, -1]], _?NumericQ, 2], plotRng} // Flatten // Union // Partition[#, 2, 1] &; Plot each interval ...

Top 50 recent answers are included