Tag Info

New answers tagged

3

Expanding on comment from Guess who it is, I think he pretty much had it nailed but instead of mapping onto pts I believe you need to use Range[Length[pts]]. GraphicsComplex will use the point number to indicate the position of the graphic object. With[ { pts = {{1, -1, 1}, {0, 0, 0}, {1, 1, 1}, {0, 0, 2}, {-1, 0, 1}} }, Graphics3D[{ Opacity[0.5], ...


2

Thanks to the reply of @Alexei Boulbitch, I was able to come up with a general answer of the question and I am writing it down part by part in order to let people with my same problem to get a general answer with some explanation.. First of all, we want to get rid of the actual x-axis labels. In the plot options we want to set Directive[FontOpacity -> 0, ...


6

You can simply use Frame and FrameTicks, add: Frame -> {{True, False}, {False, True}}, FrameTicks -> All] At the end. So that: Show[{Plot[-x, {x, 0, 1}, PlotStyle -> Directive[Thick]], Plot[-x + 1, {x, 1, 2}, PlotStyle -> Directive[Thick]], Plot[-x + 2, {x, 2, 3}, PlotStyle -> Directive[Thick]]}, PlotRange -> All, AxesLabel -> {l, ...


3

What about this approach: Show[{Plot[-x, {x, 0, 1}, PlotStyle -> Directive[Thick], Ticks -> {None, Automatic}, PlotRange -> {{0, 3.1}, {-1, 0.07}}, AxesLabel -> {l, v[x]}, LabelStyle -> Directive[FontSize -> 12], GridLines -> Automatic, GridLinesStyle -> Directive[Gray, Dashed], ImageSize -> {500}, ...


5

It seems like this might work. I think that the Lines are grouped with their values in Graphics, so that list = Cases[Normal@plt, Tooltip[{__, a__Line}, b_] :> {a, b}, Infinity] will do the trick. This will return a list where the last element is the value, and the previous elements are the Lines. To check, note that Framed@Graphics[{Most@#, ...


4

You can define a function to label the data using Labeled as in @David's answer: lblngF = MapIndexed[Function[{d, p},Labeled[d, #2[[1]][[## & @@ p]]]], #, {#2[[2]]}] &; lblF = Fold[lblngF, #, Thread[{Reverse@#2, {2, 1}}]] &; dt = {{1, 3, 4}, {4, 5}}; labels = {{"r1", "r2"}, {{"c1", "c2", "c3"}, {"c4", "c5"}}}; BarChart[lblF[dt, labels]] ...


5

This isn't pretty, but it works: BarChart[{ {Labeled[1,"c1"],Labeled[3,"c2"],Labeled[4,"c3"]},{Labeled[4,"c4"], Labeled[5,"c5"]}}, ChartLabels -> {{"r1","r2"},None} ]



Top 50 recent answers are included