How to show axis ticks when plotting graphs? #128
-
I am trying to plot a graph where each vertex is associated with a specific coordinate. From my understanding, the ways to do this are 1) make a scatter plot then draw lines between the coordinates or 2) plot as a graph by setting the x_data and y_data of the graph object. I opted for the second approach. Here is a minimum working example:
However, the axes ticks do not appear in the plot, so my question is how to show the axis ticks? I tried searching the examples as well as searching the code, but I cannot find how to enable the axis ticks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
As a graph drawing is not the same as the graph itself, a network plot only keeps a collection of vertex pairs that get ultimately represented as scatter plots and lines with a reasonable specific layout. The specific vertex positions stored in the network object only as pre-processed data to make things faster, but they are not part of the interface, and they can change at any time. Each plot type adjusts the axes to match what's expected for that plot type unless there are more plots in the same axes, in which case some heuristics decide what's best for that plot. In the case of graphs, the ticks are usually hidden because that would confuse the graph concept with the graph drawing, whose absolute positions not meaningful unless we're discussing the graph drawing.
|
Beta Was this translation helpful? Give feedback.
As a graph drawing is not the same as the graph itself, a network plot only keeps a collection of vertex pairs that get ultimately represented as scatter plots and lines with a reasonable specific layout. The specific vertex positions stored in the network object only as pre-processed data to make things faster, but they are not part of the interface, and they can change at any time.
Each plot type adjusts the axes to match what's expected for that plot type unless there are more plots in the same axes, in which case some heuristics decide what's best for that plot. In the case of graphs, the ticks are usually hidden because that would confuse the graph concept with the graph drawing, who…